I have an ASP.NET web application, and I wanted to know how I could display an error message box when an exception is thrown.
For example,
You cannot just call messagebox.write cause you are disconnected from the client. You should register javascript code that shows a messagebox:
this.RegisterClientScriptBlock(typeof(string), "key", string.Format("alert('{0}');", ex.Message), true);