PDA

View Full Version : یک سوال



amin joon
پنج شنبه 03 دی 1383, 09:22 صبح
با سلام
نحوه ی ایجاد دایرکتوری
من در یکی از topic ها قطعه برنامه ی زیر رو پیدا کردم ولی نمیدونم که عنصر Directory که استفاده کرده از چه نوعی هست.لطفآ راهنمایی کنید.


Private Sub butCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butCreate.Click
Dim strPath As String
strPath = Server.MapPath(Request.ApplicationPath) & "\" & txtName.Text
If Directory.Exists(strPath) Then
litnameexist.Text = "<p>The name " & txtName.Text & _
" already exists. Please choose a different one.</p>"
Return
Else
Try
Directory.CreateDirectory(strPath)
Session("Path") = strPath
Server.Transfer("filemanager.aspx")

Catch ex As System.UnauthorizedAccessException
' Server.Transfer("NotAuthorized.aspx")
End Try
End If
End Sub

Vahid_Nasiri
پنج شنبه 03 دی 1383, 10:12 صبح
فضای نام System.IO را اضافه کنید

amin joon
پنج شنبه 03 دی 1383, 23:08 عصر
مر30 :confy2: :confy2: :confy2: