AJAX multiple Update Panel, Triggers in ASP.NET

AJAX (Asynchronous JavaScript and XML) is not a web development tool; it’s rather a web development approach on client side to create interactive web application. Some basic AJAX Extensions to start developing AJAX enabled web page in ASP.NET are as follows.


ScriptManager

To enable AJAX in a page, you will require at least and only one ScriptManger in your ASP.NET page. Just drag ScriptManager from Ajax Extensions of Toolbox and drop it preferably at the beginning of your page. It will generate following code snippet in your web page and that’s all to do with ScriptManager.


UpdatePanel

User controls in web page that you want to behave interactively must be in between some Update Panel Tags. You may have some multiple update panels in a page.

However, UpdatePanel does not directly contain the user controls; it is rather “ContentTemplate” tag that contains the user controls in UpdatePanel.

Another important property of UpdatePanel is “UpdateMode” that can be assigned either “Conditional” or ”Always” value. It takes “Always” as default value if not specified and updates each time whenever any portion/UpdatePanel of page is posted back whereas “Conditional” value allows updating only when the specific UpdatePanel is posted back.

Triggers” is an important Tag like “ContentTemplate” in UpdatePanel. This says when to post back the UpdatePanel.


Download Source Code. In this demo, I have used three UpdatePanels in AjaxTrial.aspx page. One is for clock that is continuously posted back the UpdatePanel in every second, second one has a ListBox and a Label and is posted back at selectedItemChange event of the ListBox. The third UpdatePanel has a Button and a Label in it and this one is posted back at Button Click event.

Thanks
A Rahim khan

Advertisements
  1. Fantastic goods from you, man. I’ve take into account your
    stuff prior to and you’re just extremely wonderful.

    I really like what you have acquired here, really like what you aare
    saying and the best way in which you assert it.
    You make it enjoyable and you still care for to stay it wise.

    I can not wait to read far more from you. This is really a great site.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: