I want to upload file to server using below code and i did file size upto 10 mb max...
but i have some problem that is ... time out and lost connection some body told me to use stream which open connection always but i dont have idea how to use it as i never did asp programming very wel
is any body tell me where should i can get materail or any one just give me example to upload file to the server in effective way...
thanks
If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0 The
Dim fn As String = System.IO.Path.GetFileName(File1.PostedFile.FileName
Dim SaveLocation As String = Server.MapPath("Data") & "\" & f
Tr
File1.PostedFile.SaveAs(SaveLocation
Response.Write("the file has been uploaded"
Catch ex As Exceptio
Response.Write("Error" & ex.Message
End Tr
Els
Response.Write("Please select a file to upload"
End If

Re: Problem problem problem :( Need Help by Ray

Ray
Fri May 07 14:16:40 CDT 2004

See here please: http://www.aspfaq.com/etiquette.asp?id=5002

Ray at work

"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:69F0D300-2284-48F7-A6E7-3AB563F651A3@microsoft.com...
> I want to upload file to server using below code and i did file size upto
10 mb max....
> but i have some problem that is ... time out and lost connection some body
told me to use stream which open connection always but i dont have idea how
to use it as i never did asp programming very well
> is any body tell me where should i can get materail or any one just give
me example to upload file to the server in effective way....
> thanks
> If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0
Then
> Dim fn As String =
System.IO.Path.GetFileName(File1.PostedFile.FileName)
> Dim SaveLocation As String = Server.MapPath("Data") & "\" & fn
> Try
> File1.PostedFile.SaveAs(SaveLocation)
> Response.Write("the file has been uploaded")
> Catch ex As Exception
> Response.Write("Error" & ex.Message)
> End Try
> Else
> Response.Write("Please select a file to upload")
> End If