Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I want to handle Error Handling in my projects.
 
i want to display the errors to end user.
 
The below example error needs to be handle and display to end users.
 
1.If server connection fails.
2.If SQL insertion/updation/deletion fails
3.Javascript error,etc.
 
How to handle the above error and also how to display the error message in Modal popup or JQuery..
 
pls. provide me the exact solutions...
Posted 8-Oct-12 18:42pm
gani77871.3K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Dear Friend,
 
With the help of ajax it is very simple to error handle the kind of errors you are looking to handle.
 
Include the Ajax handle class into your code file may it be C# or VB.Net and then try to put all the methods under the Ajax class (with TRY{} CATCH(){} handler) for which you want display errors in java-script or jquery.
 
Then call the same functions from jquery or java-script and return the appropriate message from the method. From here you can easily display the message coming from the method may it be an error message or a success message through:-
 
Alert('"+[your message]+"');
 
Here you will not get the full solution from anyone rather we can guide you the way to the solution; you have to give the try yourself and then if you get stuck up somewhere then we can definitely help you out.
 
I hope you understand and try the way i provided you.
 
I am providing you also with some references that may help you out:-
 
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/
 
http://www.asp.net/ajaxlibrary/act.ashx
 
http://jquery.com/
 
Thanks
 
Varun Sareen
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,374
1 Sergey Alexandrovich Kryukov 4,713
2 Peter Leow 2,944
3 DamithSL 2,465
4 Maciej Los 2,270


Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid