Reputation: 215
I want to catch the server not responding or timed out error. i was using PageMethods
for calling a function in the serverside from javascript in asp.net web application. some times the server will not respond, so i want to handle that server not responding when i called PageMethods from the javascript which is located in aspx file.
please do the needful, thanks in advance..
Upvotes: 1
Views: 943
Reputation: 17724
I think a simple try catch would solve your problem
try {
PageMethods.MyMethod();
}
catch(exception){
//error occured
}
finally {
//some tidying up
}
javascript try catch reference
Upvotes: 2