|
|
ASP.NET VB.NET
Started by o2mc at 12-26-2007 1:14 AM. Topic has 1 replies.
 
 
|
|
Sort Posts:
|
|
|
|
12-26-2007, 1:14 AM
|
o2mc
Joined on 12-11-2007
Posts 1
|
upload files to the server
|
|
|
|
|
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
Joined on 04-09-2008
Maine
Posts 101
|
Re: upload files to the server
|
|
|
|
|
|
|
|
|
Webhost4life Fo... » General Discuss... » ASP.NET VB.NET » upload files to the server
|
|
|
|