Sunday, March 11, 2012

Is Microsoft Ajax fraud ??

No Microsoft AJAX is not a fraud. You can see lots of sites have already implement this.

make sure that you have added UpdateMode="Conditional"

like

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">


Page methods are a good way to circumvent the inefficiencies of partial postbacks.


Hi,

when you use an UpdatePanel, you get an asynchronous (or partial) *postback*. In ASP.NET terminology, a postback means going through all the page lifecycle on the server side. Therefore, this approach is perfectly reasonable because a partial postback is, indeed, a postback, though performed with an asynchronous request.

Even if you are updating a single panel, you are avoiding to reload the whole page, which would add the time needed to re-parse the whole HTML, CSS, scripts and so on.

So, the actual question to answer is whether you need a *postback* to accomplish your task. If not, then you can try different approaches, as gt1329a suggested.


Another way to think of it is: How in the world would you manage to duplicate the functionality of partial postbacks without ASP.NET AJAX? It would be a massive pain to deal with ViewState and page life-cycle issues (to the point that there are several successful companies selling what basically amount to async versions of the GridView).

Certainly, don't overuse it, but Microsoft really has given us a very powerful tool with ASP.NET AJAX. Just use it wisely.

No comments:

Post a Comment