ASP.NET MultiView

Designer View:

<asp:Menu ID=”Menu1″ runat=”server” Orientation=”Horizontal” ForeColor=”#666666″>
<asp:MenuItem Text=”OPEN” Value=”0″ Selected=”True”></asp:MenuItem>
<asp:MenuItem Text=”ACCEPTED” Value=”1″></asp:MenuItem>
<asp:MenuItem Text=”REJECTED” Value=”2″></asp:MenuItem>

<asp:MultiView ID=”MultiView1″ runat=”server” ActiveViewIndex=”0″>
<asp:View ID=”View1″ runat=”server”>…</asp:View>
<asp:View ID=”View2″ runat=”server”>…</asp:View>
<asp:View ID=”View3″ runat=”server”>…</asp:View>

Code View:

Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
MultiView1.ActiveViewIndex = Int32.Parse(e.Item.Value)
End Sub


No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: