473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to alert user when upload file size limit exceeds

390 Expert 256MB
Hi,

My web.config is set to allow 5MB file size to be uploaded in my application.
I want to show one alert message to the user when uploaded file size is greater than that.
How can I do the same.
I am using <input type=file>
My code is in c# and it is a asp.net application(version1.1)
Jan 21 '08 #1
1 2255
dip_developer
648 Expert 512MB
Hi,

My web.config is set to allow 5MB file size to be uploaded in my application.
I want to show one alert message to the user when uploaded file size is greater than that.
How can I do the same.
I am using <input type=file>
My code is in c# and it is a asp.net application(version1.1)
use......... File1.PostedFile.ContentLength()
ContentLength gives the length of the uploaded file in Bytes
Jan 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Goncalo | last post by:
Hi. You can limit the uploaded file size by changing the httpRuntime's maxRequestLength in web.config, right? So, my question is, how can you tell in CodeBehind that the file 'uploaded' is...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
10
by: erin.sebastian | last post by:
Hello Everyone, I have code that uploads files in asp. It seems to be working however on files > 200kb it bombs and i don't know why. Does anyone have any idea of why this would occur and what i...
2
by: lawrence k | last post by:
I've a file upload script on my site. I just now used it to upload a small text document (10k). Everything worked fine. Then I tried to upload a 5.3 meg Quicktime video. Didn't work. I've...
4
by: Mitul | last post by:
Hello friends, I need a help for upload media file. I had tried for that but getting following result after uploading wmv file in $_FILE variable. => Array ( => bada_gosht.wmv => =>
8
by: Newcomsas | last post by:
Hello. I'm experiecing a problem with file uploads from ASP pages. On a Windows 2000 - IIS 5 server we're running an ASP Classic application that features an upload form for files of great...
6
by: Reggie | last post by:
am trying to associate username with filename in a upload script. I get this error: Parse error: syntax error, unexpected T_STRING in /home/fhlinux169/c/ clashoff.co.uk/user/htdocs/upload.php...
6
by: howa | last post by:
Suppose the file is stored in "upload_tmp_dir ", so why I need to increase the memory limit? If I want to upload 100 MB, how large should I set? Thanks.
6
by: rodmc | last post by:
Hi, Is there a way to get the size of a file on a remote machine before it is uploaded? I would like to write some form of status counter which is updated as a fie is uploaded, and also to use...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.