Click here to Skip to main content
Click here to Skip to main content
Go to top

Basic introduction to the Atlas UpdatePanel

, 10 Jul 2006
Rate this:
Please Sign up or sign in to vote.
This is a short tutorial on how to use the new "Atlas" UpdatePanel on your ASP.NET pages. It's simple, easy, and fun.

Introduction

Welcome! I have left adopting Atlas far too late as far as I'm concerned. It is so powerful and yet so easy. I didn't have a lot of time on my hands, so I thought getting to use this new technology would require a lot of my time and it didn't.

This article will give you a quick jumpstart into the amazing world of Atlas!!!

Let's do it!

  1. Download Atlas, it's a 2.2 MB file so I doubt the boss will mind Wink | ;) Download here.
  2. Reference the Microsoft.Atlas DLL.
  3. Check to see if the Atlas Tools are added to your toolbox; if not, then right click your Toolbox and click Choose Items and just browse to the Atlas DLL.

Now comes the fun part.

Starting with Atlas

Drag and drop the ScriptManager tool onto your webpage. It'll create the following code:

<atlas:ScriptManager runat="server" ID="">

Then, all you do is set the following:

  • Set EnablePartialRendering="true"
  • Give the UpdatePanel an ID

Your tag should look something like this now:

<atlas:ScriptManager runat="server" EnablePartialRendering="true" ID="updateManager">

Great, step one complete. Remember, when using any Atlas control, you must have a ScriptManager on that page!

Creating an UpdatePanel

Now, drag and drop the UpdatePanel onto your form.

It'll create the following code:

<atlas:UpdatePanel ID="" runat="server">
</atlas:UpdatePanel>

Again, give it an ID, then set its Mode to Conditional so your tag should look like this:

<atlas:UpdatePanel ID="atlasPanel" runat="server" RenderMode="Inline" Mode="Conditional">
</atlas:UpdatePanel>

Now, the content for this panel must be entered as normal ASP.NET between ContentTemplate tags, so it should look like this now:

<atlas:UpdatePanel ID="atlasPanel" runat="server" RenderMode="Inline" Mode="Conditional">
  <ContentTemplate>
  </ContentTemplate>
</atlas:UpdatePanel>

So for example, you have two drop downs in the ContentTemplate. The first drop down being a set of countries and the second being a set of provinces or states.

<atlas:UpdatePanel ID="atlasPanel" runat="server" RenderMode="Inline" Mode="Conditional">
    <ContentTemplate>
          <asp:DropDownList ID="drpCountry" runat="server" 
              DataTextField="DESCRIPTION" 
              DataValueField="PK" AutoPostBack="True">
          </asp:DropDownList>
          <asp:DropDownList ID="drpProvince" runat="server" 
              DataTextField="DESCRIPTION" 
              DataValueField="PK" AutoPostBack="True">
          </asp:DropDownList>
    </ContentTemplate>
</atlas:UpdatePanel>

So, when the user selects a different country, the province drop down reloads. Now usually, you'd have a postback to the server and the whole screen would reload. Not anymore. Simply select a different country; now, the provinces magically change without the postback.

Additional events to update your panel

The second part of the magic is, let's say, you have a button on the form somewhere that reloads both dropdowns, all you need to do is add a trigger to the UpdatePanel as follows:

<atlas:UpdatePanel ID="atlasPanel" runat="server" RenderMode="Inline" Mode="Conditional">
  <ContentTemplate>
    <asp:DropDownList ID="drpCountry" runat="server" 
      DataTextField="DESCRIPTION" DataValueField="PK" AutoPostBack="True">
    </asp:DropDownList>
    <asp:DropDownList ID="drpProvince" runat="server" 
      DataTextField="DESCRIPTION" DataValueField="PK" AutoPostBack="True">
    </asp:DropDownList>
  </ContentTemplate>
  <Triggers>
    <atlas:ControlEventTrigger ControlID="btnReload" EventName="Click" />
  </Triggers>
</atlas:UpdatePanel>

and still no postback of the form!!!

Conclusion

Get started using Alas people, it's fun, it's free, it's easy, and besides, such a performance boost is bound to get you some brownie points from the boss and the clients!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

StevenMcD
Web Developer
South Africa South Africa
I have a year and half's experience in using the dotNet Framework. I enjoy trying to get my ASP.Net applications to perform as fast as possible due the fact that bandwidth shortages are very common here in South Africa.
 
I make extensive use of C#, ASP.Net, Javascripting, MSSQL and recently the beta's of ATLAS.
 
I also love playing XBOX360, guitar, PC games and I listen to mostly hard rock

Comments and Discussions

 
Generalauto refresh update panel Pinmembersharma sanjeev19-Apr-08 20:32 
Generalajax updatepanel Pinmembervenky45630-Oct-07 22:09 
GeneralAtals Update PAnel to a Datalist PinmemberArchu13618-Aug-07 0:15 
Questionhow to trigger sitemap using updatepanel? PinmemberCoolkushie12212-Aug-07 6:15 
GeneralAtlas UpdatePanel problem when using radiobutton Pinmemberinrakeshworld7-Nov-06 19:25 
QuestionAtlas UpdatePanel problem Pinmemberinrakeshworld7-Nov-06 19:13 
Hi All,
 
i have two radiobutton say A & B.when user choose one of them the label text
 
will be change.
 
for that i write the following code.
 

<atlas:UpdatePanel id="u2" runat="server">





<asp:Label ID="lblAmount" runat="server" CssClass="boldbody">


 

 
when user check the A first time it will work fine but when user check B it
 
will not work and viceversa.
 
please give your views
 

 
Thanks & Regards,
Rakesh Lad
AnswerRe: Atlas UpdatePanel problem Pinmemberinrakeshworld3-Jun-08 1:48 
GeneralAtlas UpdatePanel problem Pinmemberinrakeshworld7-Nov-06 19:05 
GeneralRe: Atlas UpdatePanel problem PinmemberStevenMcD7-Nov-06 19:17 
GeneralRe: Atlas UpdatePanel problem Pinmemberinrakeshworld7-Nov-06 19:46 
QuestionUnknow Error Pinmemberm3n5415-Aug-06 17:29 
AnswerRe: Unknow Error PinmemberStevenMcD15-Aug-06 18:50 
GeneralRe: Unknow Error Pinmemberm3n5415-Aug-06 22:31 
QuestionRe: Unknow Error Pinmemberm3n5423-Aug-06 16:57 
QuestionError on PostBack and CallBack Pinmemberm3n5419-Jul-06 16:47 
AnswerRe: Error on PostBack and CallBack PinmemberStevenMcD19-Jul-06 19:02 
GeneralRe: Error on PostBack and CallBack Pinmemberm3n5419-Jul-06 21:07 
GeneralRe: Error on PostBack and CallBack PinmemberStevenMcD19-Jul-06 21:55 
GeneralRe: Error on PostBack and CallBack Pinmemberm3n5419-Jul-06 23:08 
GeneralRe: Error on PostBack and CallBack PinmemberStevenMcD19-Jul-06 23:40 
GeneralRe: Error on PostBack and CallBack Pinmemberm3n5420-Jul-06 16:48 
AnswerRe: Error on PostBack and CallBack PinmemberStevenMcD20-Jul-06 19:07 
GeneralRe: Error on PostBack and CallBack PinmemberStevenMcD20-Jul-06 19:07 
QuestionRe: Error on PostBack and CallBack Pinmemberm3n5421-Jul-06 0:57 
AnswerRe: Error on PostBack and CallBack PinmemberStevenMcD21-Jul-06 1:03 
GeneralAtlas Toolkit Pinmembermgaerber11-Jul-06 1:55 
AnswerRe: Atlas Toolkit PinmemberStevenMcD11-Jul-06 2:12 
GeneralRe: Atlas Toolkit PinmemberNovacaine17-Jul-06 10:51 
GeneralRe: Atlas Toolkit PinmemberStevenMcD17-Jul-06 18:48 
GeneralRe: Atlas Toolkit PinmemberNovacaine17-Jul-06 21:47 
GeneralRe: Atlas Toolkit PinmemberStevenMcD17-Jul-06 22:00 
QuestionRe: Atlas Toolkit Pinmemberlsugirljte3-Oct-06 5:59 
QuestionRe: Atlas Toolkit Pinmemberlsugirljte3-Oct-06 6:00 
AnswerRe: Atlas Toolkit Pinmemberlsugirljte4-Oct-06 6:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 11 Jul 2006
Article Copyright 2006 by StevenMcD
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid