Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
161 views
in Technique[技术] by (71.8m points)

asp.net - Event of button is not fired when i browse any file through fileupload control and upload it..connection time out error

Hi,
I have file upload control and upload button in my application

   asp:FileUpload ID="FileUpload1" runat="server" Width="250px" />

    asp:Button runat="server" ID="btn_upload" Text="Upload"
 onclick="btn_upload_Click" 

i have included it in .aspx file
when i browse any file using this control and click on upload button
 i got the connection timeout error.
.this case is only with fileupload control,but if i dint browse any file and click on upload button then this error is not coming,
click event of upload button(btn_upload_Click) gets fired but with Fileupload control after browsing any file click event of upload button not firing.
.why this problem occurs..plz help
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

please try after including this in your web.config file

<system.web> <httpRuntime executionTimeout="999999" maxRequestLength="2097151" /> </system.web>


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...