Giving users a unified way to handle exceptions is as follows
1. Modify web.config
After modification, the code is as follows
<customErrors mode="On"
defaultRedirect="WebForm2.aspx"
/>
2. For global response, modify Global.asax
if (Server.GetLastError() is Exception)
{
Server.Transfer("WebForm2.aspx");
}
3. Exception thrown in code
throw new Exception();
Pretty simple, right?