Friday, October 19, 2007

Ajax UpdatePanal Custom Error Handling

Put This Code Within Inline Form Tag,
Note:Dont Put This JavaScript As a Seperate js File in your project,
use within a form tag

<form id="form1" runat="server">
<script language="javascript" type="text/javascript">


function pageLoad(sender, args)
{

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);

}

function beginRequest(sender, args)
{

.
.
.


}

function endRequest(sender, args)
{

var e = args.get_error();

if (e != null)
{
args.set_errorHandled(true);
alert('Custom Error');
}

}
</script>
</form>



1 comment:

Anonymous said...

Thanks for your helo. I have searched a lot to get rid of this error but got the solution now.

Many Thanks :)

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.