Click here to Skip to main content
13,148,573 members (65,448 online)
Rate this:
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

1 solution

Rate this: bad
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:-


Varun Sareen

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170924.2 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100