Does anyone know how can I create a pop-up message box in server side, so that it will display the error message in the pop-up message box when save process is failed?
Example:
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
using (TransactionScope scope = new TransactionScope())
{
//save process
scope.Complete();
Response.Redirect(url);
}
}
catch (TransactionAbortedException ex)
{
//pop-up message box to show error message
}
catch (ApplicationException ex)
{
//pop-up message box to show error message
}
}
How can I able to create a pop-up message box within the catch to pop-up the error message box to the user when the save process is failed?