can you please explain file browser control?

Posted by Naga116 under ASP.NET on 8/6/2011 | Points: 10 | Views : 1955 | Status : [Member] | Replies : 1

I am having a File Browse control in my page. How can restrict file size while browsing the file?

Like file size should not be more than 5 mb or if i would like to increase my file size through UI.

Is it possible?



Posted by: SheoNarayan on: 8/6/2011 [Administrator] HonoraryPlatinum | Points: 25

You can restrict the file size getting uploaded by changing the web.config file maxRequestLength setting, read However that works on the server side that means when user has clicked on the button then in the server side you can check for the file size and restrict it.

Here is a basic tutorials of the FileUpload control
Read this article on similar topic

This one little advance

Hope this helps


Sheo Narayan

Naga116, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response