How to empty file save in file upload control?

Posted by Chandru_ra under Regular Expressions on 7/18/2011 | Points: 10 | Views : 3025 | Status : [Member] | Replies : 2
Dear all,

am using file upload control saving in database using store procedure
if (fileVideofile.HasFile)
//Save File to the proper directory
string filename = Path.GetFileName(fileVideofile.FileName);
fileVideofile.SaveAs(Server.MapPath("UploadFiles/") + filename);
Videofile = "UploadFiles/" + fileVideofile.FileName;

Videofile = "UploadFiles/";

how to save empty file in fileupload control

Advance Thanks to all



Posted by: Sashys on: 7/18/2011 [Member] Starter | Points: 25

While uploading a file to the web server, we have a limit of 4MB by default. We can either decrease or increase this value. The value is set in the key, maxRequestLength of machine config file.

There is a maxRequestLength limit in the machine.config file (look for the <system.web> section), in the httpRuntime settings that you need to alter/raise if you want to accept anything larger than 4Mb. These are the standard settings for the httpRuntime:

<httpRuntime executionTimeout="90" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>

Pls try this.

Sasikumar .M

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

Posted by: Susanthampy on: 7/18/2011 [Member] [MVP] Bronze | Points: 25

Login to post response