By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Upload a file and stream it

P: n/a
Hello, I need to do the following
1) give a click button on my aspx page where the user can find a file
on the hard drive
2) in my code read that file like a stream and then display it back to
the user
3) display that back to the user in a datagrid.

Can you tell me how to do this?

Woudl it be easier to replace 1) with this new 1)
1) allow a user to drag a file on to my aspx page
2) same as above
3) same as above

thank you

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
23s
I would think you could just put a Web.UI.HtmlControls.HtmlInputFile into
your form, and then when the page posts back, check the Web.HttpPostedFile
collection:

Request.Files(n)

Each HttpPostedFile object has an InputStream property. If you find a file
in the collection, do whatever voodoo you want to do with the file data &
the datagrid.

<bl*****@yahoo.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hello, I need to do the following
1) give a click button on my aspx page where the user can find a file
on the hard drive
2) in my code read that file like a stream and then display it back to
the user
3) display that back to the user in a datagrid.

Can you tell me how to do this?

Woudl it be easier to replace 1) with this new 1)
1) allow a user to drag a file on to my aspx page
2) same as above
3) same as above

thank you

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.