show-notice
hide-notice

Monday, 24 June 2013

MultiView and View controls


Introduction

MultiView and View controls allow you to divide the content of a page into different groups, displaying only one group at a time. Each View control manages one group of content and all the View controls are held together in a MultiView control.The MultiView control is responsible for displaying one View control at a time. The View displayed is called the active view.





Examples 


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>
MultiView and View Controls</h2>
<asp:dropdownlist id="DropDownList1" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:dropdownlist>
<hr />
<asp:multiview id="MultiView1" runat="server" activeviewindex="2" onactiveviewchanged="MultiView1_ActiveViewChanged">
<asp:View ID="View1" runat="server">

<h3>This is view 1</h3>
<br />
<asp:Button CommandName="NextView" ID="btnnext1"
runat="server" Text = "Go To Next" />

<asp:Button CommandArgument="View3"
CommandName="SwitchViewByID" ID="btnlast"
runat="server" Text = "Go To Last" />
</asp:View>
<asp:View ID="View2" runat="server">

<h3>This is view 2</h3>
<asp:Button CommandName="NextView" ID="btnnext2"
runat="server" Text = "Go To Next" />
<asp:Button CommandName="PrevView" ID="btnprevious2"
runat="server" Text = "Go To Previous View" />
</asp:View>
<asp:View ID="View3" runat="server">

<h3> This is view 3</h3>
<br />
<asp:Calendar ID="Calender1" runat="server"></asp:Calendar>
<br />
<asp:Button  CommandArgument="0"
CommandName="SwitchViewByIndex" ID="btnfirst"
runat="server" Text = "Go To Next" />
<asp:Button CommandName="PrevView" ID="btnprevious"
runat="server" Text = "Go To Previous View" />
</asp:View>
</asp:multiview>
</div>
</form>
</body>
</html>


SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com