all groups > dotnet windows forms > january 2005 >
You're in the

dotnet windows forms

group:

File upload as ASP.Net control??



Re: File upload as ASP.Net control?? Scott Allen
1/30/2005 9:44:24 PM
dotnet windows forms: You can still use the HtmlInputFile control from code behind, just
make sure it has an ID and runat="server" is set.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconHtmlInputFileControl.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

[quoted text, click to view]
File upload as ASP.Net control?? No one
1/31/2005 12:13:01 AM
I need to upload two files, one at a time. The only file control I can
find uses the <input type="file" />, so the handling code has to go in
the HTML side and not the code behind. I would much rather code this in
the proper place for good practice. Is there an ASP.Net control for
file upload (the <asp: /> tagged controls)? Or do I have to do this the
ugly way??

Re: File upload as ASP.Net control?? no one
2/1/2005 3:25:33 AM
Thanks....now if only I could stuff this file into an MS SQL database directly.

[quoted text, click to view]
Re: File upload as ASP.Net control?? Kevin Spencer
2/1/2005 8:19:57 AM
[quoted text, click to view]

You can, but whether you should or not is a question to consider. Storing a
file in a database entails extra expense when working with the file, as it
must first be stored in the database, which can be expensive, depending upon
the size of the file, and be fetched in binary form from the database, which
involves a good hit to the database, and then turned back into a file or
file stream. Generally, references to files (names or paths) should be
stored in a database, and the files themselves in the file system.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

[quoted text, click to view]

AddThis Social Bookmark Button