Last post Dec 21, 2008 07:11 AM by TATWORTH
Dec 18, 2008 02:07 AM|Hanuman_guntupalli|LINK
hi friends, I want to upload an Excel file(very large 100,000 records) to the webserver using Vb.NET
My code (given down) works well when i upload the file to the local directory.
If I upload to the webserver, as the file size is large i want to make use of streams and upload the file.
Please help me .. How to use the Streams in VB.NET for uploading the file
Thanks in advance
Protected Sub btnUploadButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUploadButton.Click
FileName.InnerHtml = FileField.PostedFile.FileName
FileContent.InnerHtml = FileField.PostedFile.ContentType
FileSize.InnerHtml = FileField.PostedFile.ContentLength
UploadDetails.Visible = True
Dim myFileName As String
myFileName = FileField.PostedFile.FileName
Dim c As String = System.IO.Path.GetFileName(myFileName)
FileField.PostedFile.SaveAs("C:\UpLoadedUserFiles\" + c)
Success.InnerHtml = "File Upload successfull"
Catch ex As Exception
Success.InnerHtml = "File Upload not successfull"
UploadDetails.Visible = False
file upload control
Dec 21, 2008 05:33 AM|TATWORTH|LINK
How big is your 100,000 record Excel file? There is a default limit on size of upload file (4 Mb?).
Dec 21, 2008 05:38 AM|Hanuman_guntupalli|LINK
Yes the defult size can be changed by setting the size in web.config.
My file size ranges up to 100 MB.
I want the optimized way using streams
Dec 21, 2008 07:11 AM|TATWORTH|LINK
Have a look at: