Link to home
Start Free TrialLog in
Avatar of nuritat
nuritatFlag for Israel

asked on

How can I control file size in Upload control?

I have an Upload file control on my page and whould like to control that only small files will be uploaded to the server,  how can I do that? How can I control file extension ?

Thanks
SOLUTION
Avatar of Andre412
Andre412
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Or if you want to limit the upload file size cross your site in one place you can simply do it in the httpRuntime section in the web.config by specifying maxRequestLength:
<httpRuntime 
    maxRequestLength="5120"
    executionTimeout="3600"
  />

Open in new window


In this example it's limited to 5MB (5x1024KB).

/Carl.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nuritat

ASKER

How do I close this question? I already awarded all the points and accepted multiple solutions..
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.