Welcome to Webhost4life Forum Sign in | Join | Faq

ASP.NET VB.NET

Started by o2mc at 12-26-2007 1:14 AM. Topic has 1 replies.

Print Search
Sort Posts:    
   12-26-2007, 1:14 AM
o2mc is not online. Last active: 12/26/2007 5:03:16 PM o2mc

Not Ranked
Joined on 12-11-2007
Posts 1
upload files to the server
Reply Quote
I am using asp File Management to upload files to server. When I upload bigger files more than 3 mb it gives error. CAn anyone help??? <p>

I am using the below codes.<br>

Sub Upload_Click(ByVal source As Object, ByVal e As EventArgs)<br>
Dim savePath As String = "E:\temp\uploadtest\"<br>
If Not (uploadedFile.PostedFile Is Nothing) Then<br>
Try<br>
Dim postedFile = uploadedFile.PostedFile<br>
Dim filename As String = Path.GetFileName(postedFile.FileName)<br>
Dim contentType As String = postedFile.ContentType<br>
Dim contentLength As Integer = postedFile.ContentLength<br>

postedFile.SaveAs(savePath & filename)<br>
message.Text = postedFile.Filename & " uploaded" & _<br>
"content type: " & contentType & _<br>
"content length: " & contentLength.ToString()<br>
Catch exc As Exception<br>
message.Text = "Failed uploading file"<br>
End Try<br>
End If<br>
End Sub<br>
   Report 
   07-24-2008, 10:57 AM
SturdyErde is not online. Last active: 9/3/2008 7:08:23 PM SturdyErde

Top 10 Posts
Joined on 04-09-2008
Maine
Posts 101
Re: upload files to the server
Reply Quote
Possibly a timeout?
   Report 
Webhost4life Fo... » General Discuss... » ASP.NET VB.NET » upload files to the server

Powered by Community Server, by Telligent Systems