I have a ASP.net webform with a file upload requirement whereby end users upload an Excel file (might be .csv) to the web server which then populates a series of Textboxes via an AJAX style postback. (page uses a Telerik RadAjaxManager / VB asp.net 3.0)
When you upload a file to the server from a web page does it show up on the server as a memory streamor file stream? How to you load this stream (as string(s)) it into an ADO Datatable?
Here is where I am have some difficulty in the concept and coding.
Is the uploaded file a Memory Stream or will I need to store it in a Tmp directory on the server so that I can read it? I would rather not create any tmp files (unless they are disposed of my server auto-magically).
How do I go from Stream in to String that I can split on a comma?
I have had good luck with telerik's RadAsyncUpload - Telerik RadAsyncUploadDemos - it works with an Ajax call, so you do not have to disable ajax when uploading.
It will upload the files to a stream until you postback. You can then access them by using the UploadedFiles property. You can optionally specify a folder location via the TargetFolder property and it will copy the files to that location upon successful upload and postback.
You can use the OnFileUpload event to handle the uploaded file and then parse it out as well as described in this help article - RadControls for ASP.NET AJAX Documentation - OnFileUploaded