|
|
 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

November 7th, 2006, 03:41 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
FileUpload control -- file size detection
Is it possible to obtain the file size at the moment when the file path/name populates the textbox portion of the FileUpload control?
Thx
|

November 7th, 2006, 04:26 PM
|
 |
Wrox Author
Points: 33,170, Level: 79 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,161
Thanks: 7
Thanked 188 Times in 186 Posts
|
|
Do you mean client side when the file is selected, or server side when the file is uploaded?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|

November 7th, 2006, 06:24 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That's probably client side. Would like to check the file size after the file name is input into the textbox portion of the FileUpload control but BEFORE any submit button on the form pressed.
Come to think of it, that's probably not easy to do (am a newbie to VS 2005); but any suggestion I'd much appreciated. Thanks.
|

November 7th, 2006, 06:32 PM
|
 |
Wrox Author
Points: 33,170, Level: 79 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,161
Thanks: 7
Thanked 188 Times in 186 Posts
|
|
You're right. It's not easy, if possible at all.
In a normal Internet page, security settings prevent you from getting this information.
There may be third party ActiveX controls that can do this, and with lowered security settings you could use the FileSystemObject and VB Script to get the file size. But, only then in IE and in an Intranet scenario....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |