rated by 0 users
This post has 0 Replies | 1 Follower

Top 25 Contributor
Male
Posts 9
MD.MONJURUL HABIB Posted: 09-16-2011 4:26 AM

Place the following code in web.config within  <system.web> </system.web>.

 

Specific directories rather than entire application:

<location path="Upload">
<system.web>
<httpRuntime executionTimeout="9999" maxRequestLength="2097151" />
</system.web>
</location>
For individual uploader:
int maxSize = 2097151;
if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLeng­ th <= maxSize)
{
//put some logic

}
Entire Application
<system.web>
<httpRuntime executionTimeout="9999" maxRequestLength="2097151"/>
</system.web>
Page 1 of 1 (1 items) | RSS