ASPX file upload (simple)

xiaoxiao2021-03-06  87

Easily implement file upload in ASPX Upload Upload Upload Upload Upload Upload Upload, as follows: Private string UploadFile (System.Web.ui.htmlControls.htmlInputFile Tfile, String FilePath) {if (tfile.postedfile.contentLength> 0) { String strfilename = path.getFileName (tfile.postedfile.FileName); tfile.postedfile.saveas (filepath strfilename); returnction, ";}}, but there is a problem, if your attachment size is 4M The upload file will report an error. Why is it wrong? The reason is that the default maxRequestLength of the ASPX is 4096kb, which is 4MB, we need to change the following settings in Web.config, and of course the specific value is determined. ... ...executionTimeout KB unit in seconds maxRequestLength

转载请注明原文地址:https://www.9cbs.com/read-106466.html

New Post(0)