Author: tdinpsp | Posted on: 11/1/2009 9:56:54 PM | Views : 940

I have a FormView that is in insert mode when the user as pressed a button that will cause the Inserting event to be called back on the server.  In that function I determine that there was some sort of problem and I want to notify the user about it.  I tried simply making a <div> that contained the error message visible along with setting the event argument Cancel to true, but not only did it not become visible the user lost all the data he/she had entered.  However I was able to throw an exception with my error message and it would get caught by the Error event during which I was able to set the InnerHtml of the <div> to my error message and make it visible.  After that I called Server.ClearError() and continued.  However I'm still getting a problem on the client side in generated javascript code, which says: Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: and then shows my error message.& ...

Go to the complete details ...