PDA

View Full Version : مشکل کد fileupload در vs2005



masood2011
چهارشنبه 31 شهریور 1389, 17:15 عصر
با سلام کدهای من در محیط vs2005در مورد uploadفایل درست جواب می دهد ولی همان کد در هاست اینترنت erorr:

FileUpload2.SaveAs(savepath
می دهد کل کد های من با زبان vb در زیر نمایش داده شده است
Dim savePath AsString = Request.PhysicalApplicationPath
' uploads to a special upload folder
savePath += "upload computer\"
If FileUpload2.PostedFile.ContentLength <= 500000 Then
If FileUpload2.HasFile Then' verify if there is file to upload
savePath += FileUpload2.FileName
' existing file will be overwritten
FileUpload2.SaveAs(savePath)

L2.Text = "UPLOAD COMPLETE"
Else
L2.Text = "No file to upload"
EndIf
Else
L2.Text = "ERROR:FILE IS GREATER THAN IS 500000 BYTES"
EndIf