📄 new_file.aspx
字号:
<%@Import NameSpace="System.IO" %>
<HTML>
<HEAD>
<Title>创建一个新目录</Title>
<Script Language="VB" runat="Server">
Sub Page_Load(Sender As Object,e As EventArgs)
cur_dir.text=Request("dir")
new_dir.text=Request("dir")& "\"
End Sub
Sub Btn_Click(Sender As Object,e As EventArgs)
Dim subDir As String
subDir=new_dir.text & sub_dir.text
'检测将要新建的目录是否存在
If Directory.Exists(subdir) Then
Response.Write(Subdir & "已经存在!")
Else
Directory.CreateDirectory(subdir)
Response.Redirect("admin_adminvod.aspx?dir=" & subdir)
End If
End Sub
</Script>
</HEAD>
<Body>
当前目录:
<asp:Label id="cur_dir" BorderStyle="Groove" runat="server" /><br>
<p>
<Form runat="Server" ID="Form1">
目录名称:
<asp:Label id="new_dir" runat="Server" />
<asp:TextBox id="sub_dir" runat="Server" />
<asp:Button id="subm" OnClick="Btn_Click" Text="创建新目录" runat="Server" />
</Form>
</p>
</Body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -