Skip to content
Loading
  • +1
    Thanks for replying, but did you test your code, because i still have two (other) errors and i had to add using System.Web.UI; in order to avoid another error on line 7.
     
    1) a object reference is required for the non-static field, method or property 'PageClientScript'. (line 11)
    2) EventArgs does not contain a definition for 'ExceptionHandled' and no accessible method 'ExceptionHandled' could be found ..(line 17).
     
    And i guess i invoke the method by  Class1.Check(e)?
    Thanks 
    +1
  • +1
    Hello, can you answer me, please? Giving an answer with errors doesn't help me at all. 
    Thanks. 
    +1
  • +1
    Thanks but i still get the ugly aspx message and not ‘ok’ or ‘error’. I also had to change ‘page’ by ‘_page’ in the line with ScriptManager.RegisterClientScriptBlock(…) otherwise i get the error ‘the name ‘page’ does not exist in the current context.
    +1
  • Sachin Singh
    +1
    what if you set the ExceptionHandled property, put a debugger on ShowDialog(), and check the flow went there or not.
     
    1. protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)    
    2.     {    
    3. bool isError= e.Exception==null?true:false;    
    4. ScriptHandler obj= new ScriptHandler(this.Page);    
    5. obj.ShowDialog(isError);    
    6. e.ExceptionHandled=true;  
    7. }    
    +1
  • +1
    How do i set the propety ExceptionHandled?
    +1
  • +1
    I tried this:in the partial class Public Exception e { Get; set}; And this in the invoking page: obj.e()=true; Non invocable member ‘ScriptHandler.e’ cannot be used like a method.
    +1