| |||||
Navigating Views in the MultiView ControlControls You Can Use on Web Forms ASP.NET IE WebControls MultiView WebControl In the previous sections and examples were shown various ways of navigating the different View elements of a MultiView control. To recap, the first example demonstrated using <asp:imagebutton> controls in a DataList and the SetActiveView method of the MultiView to switch between views.
The second example demonstrated using <asp:button> controls and the ActiveViewIndex property of the MultiView to move forward and backward thru the views.
The third example demonstrated using <asp:linkbutton> controls in the SelectedItemTemplate of a DataList to change the active view.
This example explores yet another way to navigate the MultiView, using a Toolbar control. The MultiView, when used in conjunction with a Toolbar, provides a simple yet effective solution for organizing and presenting subsets of information with minimal coding. The Toolbar can contain ToolbarItem elements that can be configured to enable automated linking of associated View controls on a MultiView control. This example illustrates using a group of ToolbarCheckButton elements to control the navigation within the MultiView. Basically, the first ToolbarCheckButton links to the first View; the second to the second View, and so on. Let us briefly explore how that is done. To use a MultiView with a Toolbar control
<ie:toolbar id="tb1" runat="server" ... > ... individual toolbar items markup goes here ... </ie:toolbar> <ie:toolbar id="tb1" runat="server">
<ie:toolbarlabel text="Select Country:" />
<ie:toolbardropdownlist id="lstCountries" runat="server"
datasourceid="countries"
datatextfield="countryname" datavaluefield="countrycode"
onSelectedIndexChanged="getCountryInfo" autopostback />
<ie:toolbarseparator />
<ie:toolbarcheckgroup>
<ie:toolbarcheckbutton id="btnHome" text="intro" />
<ie:toolbarcheckbutton id="btnAbout" text="quick facts" />
<ie:toolbarcheckbutton id="btnSupport" text="images" />
</ie:toolbarcheckgroup>
</ie:toolbar>
See AlsoNesting MultiView Controls Using MultiView Controls in a Templated Control |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note