I think I know the answer, but is it possible to have the global.asax Application_Error event modify a textbox on the original page and not move the client to a different page? something like: Exception exp = Server.GetLastError().GetBaseException(); System.Data.SqlClient.SqlException sqlex;
if (exp is System.Data.SqlClient.SqlException) {
sqlex = (System.Data.SqlClient.SqlException) exp;
if (sqlex.Number == 50000) {
if (HttpContext.Current.CurrentHandler is Page) {
Page p = (Page) HttpContext.Current.CurrentHandler;
Control c = p.FindControl("ErrorText");
if (c != null && c is Label) {
((Label) c).Text = exp.Message;
Server.ClearError();
return;
}
}
}
}