All jQuery With Ajax

Different ways of handling errors in jQuery.ajax

While using jQuery ajax, one needs to be very careful while handling errors as there are chances that your ajax request gets failed for any reason like server didn't respond, database error or any server side exception. So it is best practice to always handle errors while using jQuery.ajax(). To handle errors, there are 3 […]
Read the rest of this entry »

jQuery : Execute/Run multiple Ajax request simultaneously

Yesterday for one of my requirement, I needed to execute/run multiple ajax request simultaneously or in parallel. Instead of waiting for first ajax request to complete and then issue the second request is time consuming. The better approach to speed up things would be to execute multiple ajax request simultaneously. Related Post: Avoid jQuery.post(), use […]
Read the rest of this entry »

Use jQuery.getScript to load external js files

jQuery provides a function called "getScript", which allows to load external Javascript or js file on the fly. The advantage of using $.getScript is that it loads the content on run time, which is far better than including <script> tag in your head section. jQuery getScript load a JavaScript file from the server using a […]
Read the rest of this entry »

Avoid jQuery.Post(), use jQuery.ajax()

Well, as you are aware that there are many ways to make an ajax call. If you don't know then do read "How to Make jQuery AJAX calls". Okay, hope you have gone through the article. So 2 very common ways are jQuery.Post() and jQuery.get().jQuery post() is for to make a post request and jQuery […]
Read the rest of this entry »

Use jQuery and Ajax together with ASP.NET Master pages

I had previously posted about "jQuery does not work properly after ajax partial postback" and the best possible solution was to put all your jQuery code in pageLoad() function instead of document.ready(). This works great. But this will not work when you are using ASP.NET master page feature and you have jQuery code in master […]
Read the rest of this entry »

Call jQuery from ASP.NET server side

In this post, I will explain you that how can you call jQuery from server side in ASP.Net. Lets place a button on the page and on click of button, server side click event of button will get executed. <asp:Button ID="btnCall" runat="server" Text="Call jQuery From Server" OnClick="btnCall_Click" /> Server side click event of button. protected […]
Read the rest of this entry »