daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected void Application_Error(object sender, EventArgs e)
  2. {
  3.     HttpException httpException = Server.GetLastError() as HttpException;
  4.     if (httpException.ErrorCode == 404)
  5.        Response.Redirect("/MainPage.aspx");
  6. }
  7.    
  8. <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx">
  9.     <error statusCode="404" redirect="MainPage.aspx" />
  10. </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. OK, I Understand
 
Top