I am trying to create a directory after my code checks to see if it exist or not, but it is only creating a file. my code is below..
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If blnstandard.Checked = False Then
Dim strsubdomain As String
Dim Result As Boolean = System.IO.Directory.Exists("\" & txtsubdomain.Text)
If Result = True Then
lblstatuswindow.Text = "Sub-Domain Already Exist. Please choose a different sub-domain name."
Else
strsubdomain = "\" & txtsubdomain.Text
System.IO.Directory.CreateDirectory(strsubdomain)
lblstatuswindow.Text = "created " & txtsubdomain.Text & " Sub-Domain"
End If
End If
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If blnstandard.Checked = False Then
Dim strsubdomain As String
Dim Result As Boolean = System.IO.Directory.Exists("\" & txtsubdomain.Text)
If Result = True Then
lblstatuswindow.Text = "Sub-Domain Already Exist. Please choose a different sub-domain name."
Else
strsubdomain = "\" & txtsubdomain.Text
System.IO.Directory.CreateDirectory(strsubdomain)
lblstatuswindow.Text = "created " & txtsubdomain.Text & " Sub-Domain"
End If
End If