UpdatePanel Exception Handling

前端 未结 3 2096
遇见更好的自我
遇见更好的自我 2021-02-01 22:42

Where exceptions occur in the UpdatePanels I\'ve implemented in the ASP.NET web app I\'m building, they cause a JavaScript error on the page with some high level error output av

3条回答
  •  清歌不尽
    2021-02-01 23:15

    If you just want to fix the browser javascript error and display the exception message to the user, you just need to add this to your Masterpage somewhere after the form declaration:

    
    
    

    You do not need to catch the OnAsyncPostBackError even unless you want to customize the message. Go to my blog post if you want more information about this.

提交回复
热议问题