Ask a Question related to ASP.NET General, Design and Development.
-
Chris Holliday #1
Upload file and read contents from the stream?
I would like to provide an interface for users to upload a csv (or other
text file). I would like to read the contents of the CSV while it is
uploading (from the stream). Is this possible? It is no trouble to read it
once it is saved, but I was thinking I could possibly save a step.
Thanks,
Chris
Chris Holliday Guest
-
Folder contents upload?
We replace our photo albums weekly on the company website. We have not figured out how to upload a folder's contents with Contribute - uploading all... -
Upload directory and contents from browers
Is it possible to updoad a directory and its contents from a browser to server...i was reading up on cfftp and was told its only for server to... -
Upload (unable to read file)
hi, i´m trying to upload a file. I tried many ways but it always return the same error... Unable to open c:\file.jpg for reading. the file... -
HOW-TO: Datagrid: Read contents of template (textbox) column in ImgBtnClick event
Hello, I have a template column of my DataGrid filled with textboxes (one textbox inside each cell/row). I have set myTextBox.ID = "myBox" in... -
Read the contents of a text file into an HTML page
"Dutch3001" <mandygretahello@msn.com> wrote in message news:57c4bcf5.0307182134.78d05a86@posting.google.com... html wont do it, and client side... -
Chris Holliday #2
Re: Upload file and read contents from the stream?
"Chris Holliday" <chris@noSpamPlease-adventureology.com> wrote in message
news:#f1RojBPDHA.304@tk2msftngp13.phx.gbl...For the archives:> I would like to provide an interface for users to upload a csv (or other
> text file). I would like to read the contents of the CSV while it is
> uploading (from the stream). Is this possible? It is no trouble to read it
> once it is saved, but I was thinking I could possibly save a step.
>
This is easily handled by doing something like the following:
Dim str As Stream
str = MyFile.PostedFile.InputStream()
Dim myText As String
Dim sb As New System.Text.StringBuilder()
Dim sr As StreamReader = New StreamReader(str)
myText = sr.ReadLine()
In the above, MyFile is the file input from the webform.
Thanks,
C.
Chris Holliday Guest



Reply With Quote

