Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How check filesize using FileUpload control?

Reply
Thread Tools

How check filesize using FileUpload control?

 
 
vijendradudhe@gmail.com vijendradudhe@gmail.com is offline
Junior Member
Join Date: Aug 2012
Posts: 12
 
      09-01-2012
Quote:
Originally Posted by VB Programmer View Post
I am using a FileUpload control (ASP.NET 2.0). How do I check the length of
the file in bytes BEFORE I let them upload it?

I believe my code checks now AFTER...

If FileUpload1.PostedFile.ContentLength >
ConfigurationManager.AppSettings("MaxVideoUploadSi ze") Then
lblErr.Text = "File needs to be > 0 bytes and less than " &
ConfigurationManager.AppSettings("MaxVideoUploadSi ze") / 1000000 & " MB."
Exit Sub
End If
gfffffffffffffffffffffffffffffffffffffffffffffffff ff
 
Reply With Quote
 
 
 
 
vijendradudhe@gmail.com vijendradudhe@gmail.com is offline
Junior Member
Join Date: Aug 2012
Posts: 12
 
      09-01-2012
ffffffffffffffffffffffffffffffff
ds
sd
f
sdf
s
df
sd
fsd
f
sd
 

Last edited by vijendradudhe@gmail.com; 09-01-2012 at 09:06 AM.. Reason: Reason for Change
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display filesize javascript using KDE konqueror linbox Javascript 0 01-20-2007 04:57 PM
get filesize using javascript trapman Javascript 3 04-19-2006 10:51 PM
check filesize before reading it Magix C Programming 4 07-06-2004 01:57 PM
Filesize limitations using cdoSendUsingPickup, cdoSendUsingPort Alan Howard ASP General 2 06-20-2004 12:44 AM
Format filesize in kB or MB Arjen ASP .Net 2 08-09-2003 03:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57