Ayman Farouk

Microsoft Maniac Guy ..!
posts - 33, comments - 104, trackbacks - 58

My Links

News

Archives

Blogroll

Links

Atlas UpdatePanel Control

I was about to blog something about the Atlas UpdatePanel control, then, I saw a new reply to this post  “UpdatePanel Question  “ in asp.net forums. So, I decided to post a small thing about using the UpdatePanel control with GridView & DataSource control.

Note: If you still do not know what Atlas is, I advice you to visit this link and download the December bits.

UpdatePanel control is one of the most interesting Atlas server controls, I think it's gonna be “the most common” control. Because it's able to support most of the functionalities you may need in your webpage.

This control allows you to do a “postback” for a specific part of the page. In fact, it simulates a postback rather than doing a real one. The first thing we have to do in order to use this control, is to enable Partial Rendering which is one of the Atlas ScriptManager control properities. And thats so easy, it just goes like this

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

Now, we can start working with our UpdatePanel.

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

           <ContentTemplate>

           </ContentTemplate>     

           <Triggers>

                     <atlas:ControlEventTrigger />

                      <atlas:ControlValueTrigger />

            </Triggers>

</atlas:UpdatePanel>

This is the standard form of the UpdatePanel,  I just placed an UpdatePanel control I called it “myPanel”. Now I'll tell you about the tags.

  • The ContentTemplate tags are clear enough to be understood, between these two tags <ContentTemplate> </ContentTemplateyou can place what you want of controls such as <asp:TextBox .. /> <asp:GridView .. /> etc.
  • Between the <Triggers> </Triggers> you can specify when this UpdatePanel will be “posted back“, and this specification can be done in two ways 1- On some control event. 2- On some control value changing; and thats why the two tags  <atlas:ControlEventTrigger /> and  <atlas:ControlValueTrigger /> are here. So, if you want to let this panel get updated on a button_click you can just add a single line of code like : <atlas:ControlEventTrigger ControlID="Button" EventName="Click" /> . I think the intellisense will help you in doing this :-)

Okay, lets see how can we fetch “filtered” data from a Datasource , and show it in a GridView control.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="UP.aspx.vb" Inherits="UP" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

Protected Sub myLButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)

        AccessDataSource1.SelectCommand = "SELECT [FirstName], [LastName], [Title], [City] FROM [Employees] WHERE ([FirstName] = ?)"

         myGV.DataSource = AccessDataSource1

         myGV.DataBind()

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

  <head runat="server">

     <title>UpdatePanel Example</title>

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

  </head>

  <body>

     <form id="form1" runat="server">

     <div>

     <asp:TextBox runat="server" ID="myTBox"></asp:TextBox><asp:LinkButton runat="server" ID="myLButton" OnClick="myLButton_Click">Submit</asp:LinkButton><atlas:UpdatePanel ID="myPanel" runat="server">

    <ContentTemplate>

         <asp:GridView runat="server" ID="myGV"  > </asp:GridView>

    </ContentTemplate>

   <Triggers>

       <atlas:ControlEventTrigger ControlID="myLButton" EventName="Click" />

   </Triggers>

</atlas:UpdatePanel>

     <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" >

            <SelectParameters>

                <asp:ControlParameter ControlID="myTBox" Name="FirstName" PropertyName="Text" Type="String" />

             </SelectParameters>

    </asp:AccessDataSource>

    </div>

    </form>

  </body>

</html>

Okay, the above page has an UpdatePanel, TextBox, LinkButton, AccessDataSource and a GridView. We want to get some information about an Employee his/her First Name is entered in the TextBox, but we wanna perform this without a page “refresh”, thus we used the UpdatePanel control and we located the GridView in it. Now, the Data will be changed everytime then Button clicked. Thus we used the <atlas:ControlEventTrigger /> tag.

Back to the forums post; In the post I linked to. The problem was that the DataSource is not accessible if it's not located in the UpdatePanel, and I tried this before and I said yes. But I think I was mistaken, cause lately, I found that things are working okay even if the DataSource control is located out of the UpdatePanel.

One more thing I want to tell you about, is that you can configure your UpdatePanel control using some easy GUI forms. I think, they're helpfull in making triggers.

What I wrote above, was a small thing about the UpdatePanel  control, hope this post helps in making this control more familiar, I also hope it's not “boring post” ..

A.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Saturday, February 04, 2006 9:50 PM |

Feedback

Gravatar

# re: Atlas UpdatePanel Control

Hi,
That is helpful post. There are manythings in VS2005 and sometime mixup and confusing if you try to learn fast. One more thing if you post on you blog.

Simple example about

1- How we drag and drop webparts without page refresh or postback or Minimize or Restore webpart without postback.

I will vist again to if see if you post anything useful

Thanks
2/5/2006 7:22 AM | P_Programmer
Gravatar

# re: Atlas UpdatePanel Control

I think near your linkbutton, you are missing an opeing UpdatePanel tag. Nice article BTW.
3/1/2006 11:24 PM | Peter Kellner
Gravatar

# re: Atlas UpdatePanel Control

Hello Peter, no am not missing an openning tag but it is lying on the same line of LINK BUTTON. Thanks :)
3/2/2006 1:37 PM | Ayman Farouk
Gravatar

# re: Atlas UpdatePanel Control

Erick Maybe you should use propertyName="SelectedItem" instead of a value.
7/22/2006 12:04 PM | Horixon
Gravatar

# re: Atlas UpdatePanel Control

Erick, I have found that the in the ControlEventTrigger, the EventName is case-sensitive. Perhaps it is the same for the ControlValueTrigger tag.

Try this:
<atlas:ControlValueTrigger ControlID="textbox1" PropertyName="Text" />

7/24/2006 3:13 PM | Ziko
Gravatar

# re: Atlas UpdatePanel Control

Someone knows how to create dynamically an updatepanel.?
i cant put a content template.
dim up as new updatepanel
upUpdate.Controls.Add(outerTable)
10/13/2006 4:37 PM | Kallaz
Gravatar

# re: Atlas UpdatePanel Control

A perfectly interesting post thank you.
10/25/2006 8:37 AM | lisa
Gravatar

# re: Atlas UpdatePanel Control

Thanks!! Excellent post...
2/20/2007 12:18 PM | Manoj
Gravatar

# re: Atlas UpdatePanel Control

Hello all there,

I am facing a problem with update panel...
when my content get updated during postback.....i need to make it hide and want o show only progess icon in place of contents...

and as the content get updated, progess bar should get invisible and the updated content should be display on page...

I am able to achieve this task....


Can anyone here help me to rid out this issue....

many thaks in advance.......

regards,
Abhishek



9/12/2007 5:19 AM | Abhishek Jain
Gravatar

# re: Atlas UpdatePanel Control

nice article
5/12/2008 4:27 AM | Ajit Singh,Noida/9899488392
Gravatar

# re: Atlas UpdatePanel Control

Hi,
this is really good solve.This helped me to do with update panel in atlas.
Great job.......
10/14/2008 4:27 AM | Maloy Adhikari
Gravatar

# re: Atlas UpdatePanel Control

yes,the shox shoes is running shoes ,durable and fashion.The Beloveshox onine store sale cheap but real quality .And promise the more you buy ,the more discount you have.welcome you to choose.
8/24/2009 11:08 AM | leo
Gravatar

# <p><a href="http://www.beautyjordan.com/mens-nike-air-jordan-18-shoes-c-495.html"><strong>www.beautyjordan.com store,</strong></

<p>www.beautyjordan.com store,al l jordan shoes are very comfort and fashion. come on and choose what you like</p>
Gravatar

# re: Atlas UpdatePanel Control

Would you like to be cool on your foot? Come here, the jordan shoesgive you the super feeling!
9/4/2009 2:04 AM | beautyjordan
Gravatar

# re: Atlas UpdatePanel Control

www.beautyjordan.com All Jordan shoes are made of high quality raw materials and low price. There are fashionable designs and various colors.
9/4/2009 2:05 AM | beauty
Gravatar

# re: Atlas UpdatePanel Control

Thank you for your sharing! It's great!http://www.beautyjordan.com
9/4/2009 2:07 AM | beauty
Gravatar

# re: Atlas UpdatePanel Control

our puma shoes is original
and you can order from us
for the original gucci shoes and puma sneakers
welcome to post the order and order from our company
we are honest supplier in the world!
pls come to our shop and pick the puma shoes for you
it is the world famous shoes you will like
http://www.puma2u.com/

9/20/2009 10:02 AM | lili
Gravatar

# re: Atlas UpdatePanel Control

Ugg boots (sometimes referred to as uggs or ug boots) are a style of sheepskin boot, with wool as the inner lining and a tanned outer surface worn by both men and women. Ugg boots often have a synthetic sole, although this is not universal. Uggs have been identified as a fashion trend for men and women since the early 2000s. In late 2008, Ugg boots grew again in popularity with men as male celebrities were seen in them.
http://www.llikeonline.com

9/20/2009 10:03 AM | lili
Gravatar

# PUMA Shoes high quality with preference price ! http://www.puma2u.com/

PUMA Shoes
high quality with preference price !
http://www.puma2u.com/
9/27/2009 10:06 PM | lulu
Gravatar

# PUMA Shoes high quality with preference price ! http://www.puma2u.com/

our puma shoes is original
and you can order from us
for the original gucci shoes and puma sneakers
welcome to post the order and order from our company

http://www.puma2u.com/

9/28/2009 9:56 PM | LIULI
Gravatar

# Ugg boots on sale http://www.llikeonline.com

Ugg boots are a style of sheepskin boot, with wool as the inner lining and a tanned outer surface worn by both men and women. Ugg boots often have a synthetic sole, although this is not universal. http://www.llikeonline.com
9/28/2009 10:10 PM | lili
Gravatar

# hh

Welcome to our website:http://www.llikeonline.com.

Find cheap uggs and buy Cheap Ugg Boots online is your best choice. We can provide Fashion design and High quality UGG boots,ugg sandals,ugg shoes cheap for people of all ages ,UGG for men, ugg for women,ugg for kids, authentic UGGs.
exclusive ugg boots store, Always with pleasure at your service.

Payment method: Western Union, IPS,GSPAY
Delivery by EMS in 6-9 business days
9/29/2009 7:20 AM | xx
Gravatar

# PUMA Shoes high quality with preference price ! http://www.puma2u.com/

PUMA Shoes

http://www.puma2u.com/
9/29/2009 10:07 PM | lulu
Gravatar

# Nearly 11,000 mainland tourists travel to Taiwan during National Day holiday

cheap metin2fd
10/13/2009 12:51 AM | yanjia
Gravatar

# re: Atlas UpdatePanel Control

I ordered chocolates hoping they wouldn't show marks as much as my beige uggs on sale and waterproofed them when I first got them. They look so much cleaner than my old beige pair, I wear my Whooga's all year round, they don't make my feet sweat as much as my older pair. I'm very impressed with how they are holding up to my abuse, very well made. My only suggestion to everyone is keep them dry and out of the mud

Wow, my ugg boots will not be coming off now! I’ve had them on for 12hrs strait and I do not want to take them off. Thanks for everything, well worth the wait.
10/26/2009 12:58 AM | uggs
Gravatar

# UGG

<p>Women's ugg bailey button as well as the Classic Short,is a calf-height boot made from genuine twin-face sheepskin.With a wooden UGG logo button and elastic band closure. The ugg bailey button sheepskin can either be worn up or cuffed down adding a little variety depending on your style.All boots in our Classic Collection feature a soft foam insole covered with genuine sheepskin and have a molded EVA light and flexible outsole designed for amazing comfort with every step.</p>
11/5/2009 1:32 AM | Matt
Gravatar

# re: Atlas UpdatePanel Control

Very good transaction. ugg mayfaire bootsare exactly

what my daughter wears. Wonderful!!
11/17/2009 1:58 AM | wqerewtwet
Gravatar

# <p>Nice! I like! My <a href="http://www.buddyugg.com/"><strong>ugg classic cardy</strong></a> arrived today, I'm very pleased w

<p>Nice! I like! My ugg classic cardy arrived today, I'm very pleased with them. So silky smooth and soft I can't believe it. I researched the whole ugg thing last year but decided not to order because I really couldn't afford a pair. This year I read about Whooga's in a fashion forum and decided to give them a try. I ordered a size too small initially and had to return them for a 6 which was a bit annoying but eventually worth the wait, I'm a 5.5 in most shoes but uggs boots on sale sometimes vary between 5.5 and 6. I probably should have measured my foot, anyway I'm very pleased..</p>
11/22/2009 6:37 PM | <p>Nice! I like! My <a href="htt
Gravatar

# re: Atlas UpdatePanel Control

Hello,i am happy to land here and get such helpful information for my computer.Thanks!
2/3/2010 12:54 AM | diyugg
Gravatar

# re: Atlas UpdatePanel Control

Hi, your post information is very useful.
2/24/2010 2:34 AM | timberland
Gravatar

# re: Atlas UpdatePanel Control

Have you heared about a game which you need use swg credits to play,
3/7/2010 12:34 AM | swg Gold
Gravatar

# re: Atlas UpdatePanel Control

Your post is practical.
3/8/2010 3:46 AM | diyugg
Gravatar

# re: Atlas UpdatePanel Control

Thank you for sharing the useful information.
3/8/2010 3:48 AM | jordamspacejams
Gravatar

# re: Atlas UpdatePanel Control

Thank you for your useful post.
3/9/2010 10:02 PM | diyugg
Gravatar

# re: Atlas UpdatePanel Control

I very glad to enter your website ,and learn something useful.
3/9/2010 10:04 PM | jordanspacejams
Gravatar

# re: Atlas UpdatePanel Control

You can use DVD to MP3 Converter to select target subtitle and audio track according at your will.
3/10/2010 7:57 PM | NBNNBNB
Gravatar

# re: Atlas UpdatePanel Control

Thank you for sharing this useful information.
3/19/2010 9:59 PM | Chanel Watches
Gravatar

# re: Atlas UpdatePanel Control

it is interesting,i like it!
3/25/2010 8:56 PM | wow money
Gravatar

# game

If you want to play Fly for Fun money, you need more Fly for Fun gold
6/14/2010 2:18 AM | flyff
Gravatar

# re: Atlas UpdatePanel Control

this is really good solve.
7/26/2010 12:07 AM | spacejordan
Gravatar

# re: Atlas UpdatePanel Control

This article very well, thank you for sharing
8/3/2010 3:40 AM | Air Jordan 2010
Gravatar

# re: Atlas UpdatePanel Control

You say well, I am agree with you very much. It is your best choice.
8/20/2010 10:40 PM | accessorize
Gravatar

# re: Atlas UpdatePanel Control

Flag this commentIf you like something just go and get .
http://www.airjordan-sale.com/michael-jordan-shoes-c-25.html Michael Jordan Shoes
9/6/2010 3:49 AM | Air Jordan 2010
Gravatar

# ugg cardy boots

<p>Cheap ugg sale are a style of unisex sheepskin boots lined with wool on the inside and with a tanned outer surface.Knitted ugg boots often have a synthetic sole, although this is not universal.
9/12/2010 5:06 AM | hi
Gravatar

# re: Atlas UpdatePanel Control

I learned a lot of about blogs, and your is a grreat of piece of them. Thanks to share
12/13/2010 1:24 AM | lacoste polo shirts
Gravatar

# re: Atlas UpdatePanel Control


3 Jun 1999 VANCOUVER – The Consumers ; Association of Canada, British Columbia, today released its review of the automobile insurance rates issue in
12/13/2010 1:27 AM | lacoste clothing
Gravatar

# re: Atlas UpdatePanel Control

Total I believe this really is one thing to think about nevertheless it may very well just be just a little little bit of base. In my nation we need to honer excellent writers and I’m adoring your submit as I do assume it is actually fairly wonderful.
12/13/2010 1:29 AM | jordan retro 3
Gravatar

# re: Atlas UpdatePanel Control

For the ones that haven’t been with this field long enough – I do know that the web is not the most reliable resource for info. but for sure I can say that the author is correct, however odd it may look
12/13/2010 1:31 AM | air retro 7
Gravatar

# re: Atlas UpdatePanel Control


I was extremely tickled to stumble throughout this site.I needed to thank you for this Interesting weblog!! I really enjoyed each small bit of it and I have you favorited to take a look at new tales you post.
12/13/2010 1:32 AM | moncler down jackets
Gravatar

# re: Atlas UpdatePanel Control

Hello! I adore your notes! they’re so funny!
12/13/2010 1:38 AM | puma ferrari shoes
Gravatar

# re: Atlas UpdatePanel Control

Hi I discovered this great site in error as i was searching yahoo for this issue, I can say your site is really helpful Furthermore , i love the theme, its amazing!. I dont have very much time for you to read your post currently but We have bookmarked it and in addition signed up for your RSS feeds. I’ll be back a couple of days. many thanks an excellent site.
12/13/2010 1:39 AM | puma future cat
Gravatar

# re: Atlas UpdatePanel Control

While I have to disagree on some of the information, however I still really liked it. I look forward to looking at more of your work.
12/13/2010 1:39 AM | ferrari shoes
Gravatar

# re: Atlas UpdatePanel Control


Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.
12/13/2010 1:40 AM | puma ferrari future
Gravatar

# re: Atlas UpdatePanel Control

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.
12/13/2010 3:14 AM | classic ugg boots sale
Gravatar

# re: Atlas UpdatePanel Control

welcome to cheapoakleysunglasses.com.we offer cheap brand sunglasses,belts,caps,cosmetics sales&wholesale.high quality,low price,fast arrived.welcome

everybody to shopping.welcome to email whf527@gmail.com
3/5/2011 1:51 AM | wengman
Gravatar

# re: Atlas UpdatePanel Control

The Black Nike Air Max as based on the human anatomy.
3/17/2011 6:07 AM | nikeshoes
Gravatar

# re: Atlas UpdatePanel Control

As to the issue you talked about,I'd like to recommend a good website to you.I've bought some Nike shox shoes that are both cheap and quality on the website (http://www.shoes-onlineshopping.com/productlist.asp?baseid=19&bid=176). I wish my recommendation can help you!
3/25/2011 9:14 PM | Bruce lee
Gravatar

# re: Atlas UpdatePanel Control

Hello everyone,As the issue you talked about,I'd like to recommend a good website to you.I've bought some shoes that are both cheap and quality on the website (www.100topshoes.com).I wish my recommendation can help you!
3/26/2011 9:53 PM | Alan Honesty
Gravatar

# sonia

Great, thanks for sharing this blog post. Fantastic.
4/13/2011 2:40 AM | flowers delivery ukraine
Gravatar

# cheap nikes, cheap shoes, wholesale nikes shoes

Online shopping Nike shoes,air jordan shoes,cheap jordans,wholesale nike jordans shoes for china. nike air jordan shoes for cheap,wholesale Jordan shoes,cheap gucci shoes for China,wholesale gucci shoes,sale Nike air max shoes,air max shoes cheap.
If you need more info,please visit to: http://www.cheaper-nikes.com
www.cheaper-nikes.com.In 1967, Knight and Bowerman made the handshake deal formal and incorporated as BRS Inc. Jeff Johnson signed on in 1965 as the Air Jordans Shoes company's first full-time Cheap Nike Sneakers salesperson and opened Blue Ribbon Sports' first retail outlet the following year. In 1971, Johnson made an incalculable contribution to the Wholesale Nike Sneakers company: One night, he dreamed of Nike Jordan Shoes, the Greek goddess of victory, and suggested the Dunk Sb Shoes to his bosses. The company used the moniker for its first footwear product to feature the "Swoosh" mark -- a soccer cleat called the Nike Dunk Sb Shoes, whose name beat out Knight's suggestion that they call it the Dimension 6.
6/24/2011 10:31 PM | cheapernikes
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: