In my project I am getting some errors and exceptions, like session, connection failed, exception, and I do not want see the error messages.
Instead I want to redirect to login page so I have written the following code, but the problem is that it's showing the error and when I am clicking the stop button from the visual studio 2.0.
Then its redirects to the login page.
I have used both the global a sax and web.config
void Application_Error(object sender, EventArgs e)
{
Response.Redirect("~/Login.aspx");
}
<customerrors mode="On" defaultredirect="~/Login.aspx">
<error statuscode="404" redirect="~/Login.aspx">
<error statuscode="403" redirect="~/Login.aspx">
<error statuscode="401" redirect="~/Login.aspx">
<error statuscode="500" redirect="~/Login.aspx><br mode=" hold=" /></error></customerrors><br mode="></error></error></error></error></customerrors>
[edit]HTML section characters escaped - use the option below the text box when pasting HTML or it will not be readable - OriginalGriff[/edit]