Ch13-03-02.aspx 如何创建文件夹
Sub Button1_Click(Obj As Object, E As EventArgs)
If Trim(Path1.Text) = "" then
Show1.InnerHTML = "请输入文件夹名称!"
Exit Sub
End If
Show1.InnerHtml = ""
If Directory.Exists(Path1.Text) = True Then
Show1.InnerHTML = Show1.InnerHTML & _
"指定的文件夹存在,无法创建文件夹!"
Else
Show1.InnerHTML = Show1.InnerHTML & _
"指定的文件夹不存在,可以创建文件夹!"
Directory.CreateDirectory(Path1.Text)
End if
End Sub
文件夹名称:
Runat="Server" />
OnClick="Button1_Click" Runat="Server" />
BorderColor="#FF0000" Runat="Server" />