Ajax Partial Rendering

When programming a web application you should consider partial rendering as the middle ground to fully fledged Ajax apps. My personal opinion is that Ajax makes life a lot easier for the user and here
I am going to show you how to add Ajax partial page rendering.

ScriptManager
The script manager manages all client side scripts that Ajax uses. By adding the script manager control to your web page you are adding the scripts that are needed to support Ajax.
These scripts are used to support partial rendering and the script manager takes care of the partial rendering cycle for you using these scripts.


Note:
You can only have one script manager to a page if you wish to add script to the same script manger use the ScriptManagerProxy.

UpdatePanel
Update panel is a section that gets updated when any of its controls cause a post back. You can have multiple update panels.

Partial Rendering
Partial rendering is when an event is fired from an update panel registered control. The script manager will take over from the post back life cycle at a
certain stage and use the xmlhttpRequest object to execute and retrieve data from the server side and display that data in the update panel area by using DOM or DHTML.
So the entire page is not being posted back and the user just experiences an asynchronous update.

XMLHttpRequest example

var request = new XMLHttpRequest();
request.open("GET", url, false);
request.send(null);
if (!request.getResponseHeader("Date")) {
    var cached = request;
    request = new XMLHttpRequest();
    var ifModifiedSince = cached.getResponseHeader("Last-Modified");
    ifModifiedSince = (ifModifiedSince) ?
      ifModifiedSince : new Date(0); // January 1, 1970
    request.open("GET", url, false);
    request.setRequestHeader("If-Modified-Since", ifModifiedSince);
    request.send("");
    if (request.status == 304) {
        request = cached;
    }
}


Partial Rendering Example
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
   
</ContentTemplate>
</asp:UpdatePanel>

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

May 21. 2010 18:51

Designer handbags

I will use on my blog. You've obviously spent some time on this. Well done!

Designer handbags

August 13. 2010 13:13

Jimmy Stansifer

Hi. I genuinely liked reading by means of your current content!. High-quality substance. I would undoubtedly recommend you to arrive up with articles a bit far more frequently. By doing this, having this sort of a useful weblog I really feel you will rank higher inside the search engines . I also subscribed for your Rss. Continue the good job!

Jimmy Stansifer

August 14. 2010 10:15

Roselee Baltz

I need to say, as significantly as I enjoyed reading what you had to express, I couldnt assist but lose interest following a whilst. Its as in the event you had a great grasp on the topic matter, but you forgot to contain your readers. Possibly you need to think of this from a lot more than one angle. Or perhaps you shouldnt generalise so a lot. Its greater should you think about what others may well have to express instead of just going for the gut reaction for the subject matter. Take into consideration adjusting your own thought method and giving others who may well go through this the benefit with the doubt.

Roselee Baltz

August 16. 2010 15:53

Wordpress Themes

Well said, you just earned another subscriber

Wordpress Themes

August 17. 2010 03:02

Malik Wurtz

Im no specialist, but I feel you just built the top point. You obviously know a great deal about what youre talking about, and I can truly get behind that. Thanks for becoming so upfront and so honest in regards to the subject matter matter. I actually sense like We've a much better understanding now.

Malik Wurtz

August 17. 2010 13:12

vigrx

your site layout is very good

vigrx

August 21. 2010 05:37

serwis komputerowy Elbląg

Ok this is super - i have mail !!!

serwis komputerowy Elbląg

August 26. 2010 23:22

Foster Phalen

If I might --perhaps you should consider adding a few images. I dont mean to disrespect what youve said; its very enlightening, indeed. However, I think would respond to it more positively if they could be something tangible to your ideas. Keep it up, but put a little more into it next time

Foster Phalen

August 28. 2010 00:17

Sunshine Falling

Hello, I do not usually publish comments on blogs, as I wish to learn only. But I find the article that you've written earlier has very insightful information, and I discover it very informational. Anyway, I'm questioning whether or not you're open for link trade, as I hope that we will agree on a mutual hyperlink trade agreement. Hope to hear a constructive reply from you, and have an awesome day!

Sunshine Falling

August 31. 2010 08:35

new driver sign

Many thanks for creating the effort to talk about this, I feel strongly about this and like learning a great deal more on this subject. If possible, as you gain expertise, would you mind updating your weblog with a great deal more info? It's very useful for me.

new driver sign

August 31. 2010 10:10

Nude Chat

I will post a link to this page on my blog. I am sure my visitors will find that very useful.

Nude Chat

September 1. 2010 20:52

Nude Cams

Interesting read, thanks for helping keep me busy at work ;)

Nude Cams

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day