SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- protected void Application_Error(object sender, EventArgs e)
- {
- HttpException httpException = Server.GetLastError() as HttpException;
- if (httpException.ErrorCode == 404)
- Response.Redirect("/MainPage.aspx");
- }
- <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx">
- <error statusCode="404" redirect="MainPage.aspx" />
- </customErrors>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.