can you please explain asp.net file browser control?

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

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?

Nagaraju


Responses

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

Up
0
Down
You can restrict the file size getting uploaded by changing the web.config file maxRequestLength setting, read http://www.dotnetfunda.com/articles/article547-aspnet-20-file-upload-control-.aspx. 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 http://www.dotnetfunda.com/tutorials/controls/fileupload.aspx
Read this article on similar topic http://www.dotnetfunda.com/codes/code64-how-to-upload-files-in-asp-net-.aspx

This one little advance http://www.dotnetfunda.com/articles/article1062-fileupload-uploading-file-to-the-server-without-clicking-a-button-.aspx.

Hope this helps

Thanks


Regards,
Sheo Narayan
http://www.dotnetfunda.com

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

Login to post response