Monday, October 29, 2007

Ajax UpdatePanel (12) Error Handling 2

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server" AllowCustomErrorsRedirect="true">

</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />

</ContentTemplate>

</asp:UpdatePanel>

</form>

In web.config,



<customErrors mode="On" defaultRedirect="~/Error.aspx"></customErrors>

The error will be redirected to the custom error page.

blog comments powered by Disqus