fletchsod
Programmer
- Dec 16, 2002
- 181
I'm using the file upload in ASP.NET. I noticed when an "exceed file size" error occurred while uploading the file, there I have no way to redirect the webpage after catching this error. This is the script I wrote in global.asax file.
So, I did a test script in code-behind on a normal webpage "test.aspx" and tried a webpage redirect and it works (This script doesn't have the file upload parts).
So, the question is was it a "webpage-redirect" issue or a "file-upload error" issue that prevent the redirect from working? I ran the debugger and it showed the global.asax caught the error and passed on the webpage redirect to Internet Explorer 8. So, why am I getting the IE8's built-in error about the loss of Internet connection?
Can anyone help me out?
Thanks...
Code:
if (oHttpException.ErrorCode == -2147467259)
{
Response.Redirect("Error2.aspx", false);
}
So, I did a test script in code-behind on a normal webpage "test.aspx" and tried a webpage redirect and it works (This script doesn't have the file upload parts).
So, the question is was it a "webpage-redirect" issue or a "file-upload error" issue that prevent the redirect from working? I ran the debugger and it showed the global.asax caught the error and passed on the webpage redirect to Internet Explorer 8. So, why am I getting the IE8's built-in error about the loss of Internet connection?
Can anyone help me out?
Thanks...