I have a pagination control that refreshes a DIV via some JQuery Ajax, however if and when an error occurs say if the page crashes because it couldn't connect to the database or some other reason. My default error page gets displayed inside that DIV instead of the results..
So my question is how do you make it so that doesn't happen, that when the error occurs that it re-routes the user to the error page instead of just refreshing the DIV with the contents of the error page?
Update: I am just doing a simple
$("#PagerContainer").load($(this).attr("href"));
On a link click event handler.
What I need it to do is do full redirect to the error page instead of putting the contents into the DIV
The error is trapped from the Global.Aspx from the Application_Error
Another Update: Where this is happening isn't actually an ajax post it is a normal form submit from with in a modal... What would I do in that case.