|
|
||||||||
| Home Page |
||||||||
Nesting Updatepanels in Asp.net 3.5In this tutorial, we will look at how we can nest UpdatePanels. You can nest as many UpdatePanels as you want- there is no limit. In this example, we will be creating two UpdatePanels and nesting one in the other. One will display a person from a database, that is selected from a DropDownMenu, the nested UpdatePanel will display the current time, so we can see when it is updated. The first thing we will do is create a sample database - or if you have your own, you can use that. For this example, we will be using one table with a few names and cities as our data. We will need a ScriptManager, a DropDownList, a SqlDataSource, and our UpdatePanel to begin with:
We have set our DropDownList to be populated by our SqlDatSource so that the names are displayed from our database, which allows the user to select. Notice that we also set the UpdateMode of our UpdatePanel to Conditional as to only allow it to reload when the DropDownList is selected, which is identified with the trigger we added.
We now have added the FormView Control to display the selected person to the user, but currently won't do this as it does not know which person we select as yet. Notice that we have a button in the second UpdatePanel to refresh the current time. This is to demonstrate that we can reload just the nested UpdatePanel, using the trigger we hijack the attempt at postback, and instead, just reload the UpdatePanel. Please follow the link to ajaxtutorials.com to continue with the tutorial and code. Happy Coding!
Rate this Article:
Current: 1 / 5 stars - 3 vote(s).
Article Tags: Ajax, Nesting, Asp.net 3.5 Article Source: http://www.articlesbase.com/programming-articles/nesting-updatepanels-in-aspnet-35-519005.html About the Author:
Related ArticlesRich Internet Applications (ria) Installing Ajax Toolkit for Visual Studio .net 2005 The Web 2.0 Effect: the Characteristics of a Web2.0 Website Finding a Website for Hot Source of CSS Information? Creating a Simple Ajax Control in Asp.net 2.0 and C# What is the Ajax Enabled Google Tool-kit? Your One Stop for CSS Information Got a Question? Ask.Ask the community a question about this article:Frequently Asked Questions How can i prevent swifts nesting in the eaves of my roof? What's the best performing code or script for ... How do I set up my own PHYSICAL DNS?? Are there any demo CDs or online tutorials for ... Ajax Hot Water Boilers Firefox Latest Programming ArticlesTips for Buying Software Online Mvc Design Pattern Advantages of Low Cost Contract Programmers in Freelance Programming A Guide to Cnc Kits A Guide to Cnc Tube Bending Machines Ways to Hire Dedicated Php Programmers Top 4 Reasons Why Addressing Web Accessibility is Important Xlphoto Printing, the Best Choice for Banner Printing and Poster Printing More from Ajax TutorialsSorting Gridview Data With Ajax |
||||||||
|
Article Categories
|
||||||||
|
|
||||||||