Wednesday, October 13, 2010

Use many Ajax Panels and triggers on the same page

When you have to single page for a whole site or a main part of it then you have to use panels, making them visible or invisible.
Here is a very good article to start off understanding and working with Ajax panels and triggers
When using two more update panels (and/or controls that are not in Panels) the trick is to use triggers to use the control id and the event method name
for a trigger
<asp:asyncpostbacktrigger controlid="Button1" eventname="Click">
You can see that example working here
The dopdownlist for the selection of color is outside any panel but has a trigger places for it in one of the panels and hence behaves like a part of the panel. This can be used when you have two (or more) panels (i.e like a set of controls) and you need some external check for controls in there.

No comments:

Post a Comment