Home » Posts tagged "ajax"

jQuery, Each() and Async Gets

H04K0067

One of the things to keep in mind when using jQuery is that nothing is a blocking call.  Sure, there is a certain sequence to when things operate.  But, to be safe, you should always assume that step two will happen during step one.

Nowhere is this more evident than when retrieving content from a URL and inserting that content in your page.

Continue reading “jQuery, Each() and Async Gets”

Tab Control ActiveTabIndex Lost on Postback

tran-land-01 I just got off the phone with a client who is using the MS-AJAX TabControl in one of his applications and any time he causes a postback, the tab resets to the first tab.

If you’ve never seen the problem, you’re lucky.  There are a couple of ways around the problem.  The first and easiest if it works in your situation is to put the tab in an update panel so that you never actually do a full postback.

However, there are times when this won’t work.  In this particular case it is because one of the tabs holds the file upload control, which can’t be used inside an update panel.  (Another problem we had to find a way around last week.)

Continue reading “Tab Control ActiveTabIndex Lost on Postback”

ASP.NET AJAX using JSON – Here’s how.

image Last week I wrote a post about how simple JSON is. In it I explained the main differences between using JSON and using the update panel. I really started out thinking I’d get to how to write JSON code, but I ran out of space. Well, today, we get to the HOW.

All JSON really is, is the ability to have JavaScript code call a WebService for our data, and write it into the HTML on the client side. If you know anything about how to write a WebService, this should be rather trivial because your web service is going to look just like any other web service with the exception of an added attribute.

Continue reading “ASP.NET AJAX using JSON – Here’s how.”