Hi frds
i have nested multiviews and used menucontrol to navigate throught views
this is my html code
[code=asp]
<asp:Menu ID="Menu1" Font-Bold="true" Orientation="Ho rizontal"
StaticEnableDef aultPopOutImage ="False"
OnMenuItemClick ="Menu1_MenuIte mClick" runat="server" >
<StaticMenuItem Style CssClass=MenuCe ll ItemSpacing=0px />
<StaticHoverSty le CssClass=MenuCe llHover/>
<StaticSelected Style CssClass=MenuCe llSelected ItemSpacing=0px />
</asp:Menu>
<asp:MultiVie w ID="mView1" runat="server" ActiveViewIndex ="0">
<asp:View ID="View1" runat="server">
<asp:Label ID="lblView1" runat="server" Text="U r in view1"></asp:Label>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:Label ID="lblView2" runat="Server" Text="U r in View2"></asp:Label>
</asp:View>
<asp:View ID="View3" runat="server">
<asp:Label ID="Label1" runat="Server" Text="U r in View2"></asp:Label>
</asp:View>
<asp:View ID="View4" runat="server">
<table>
<tr>
<td valign="top">
<asp:Menu ID="SubMenu1" runat="Server" Orientation="Ve rtical"
StaticEnableDef aultPopOutImage ="false"
OnMenuItemClick ="SubMenu1_Menu ItemClick">
<StaticMenuStyl e CssClass="MenuC ell" />
<StaticHoverSty le CssClass=MenuCe llHover />
<StaticSelected Style CssClass=MenuCe llSelected />
</asp:Menu>
</td>
<td>
<table>
<tr>
<td>
<asp:MultiVie w ID="SubMultiVie w1" runat="server">
<asp:View ID="SubView1" runat="server">
<asp:Label ID="lblSubView1 " runat="server" Text="u r in submenu"></asp:Label>
</asp:View>
<asp:View ID="SubView2" runat="server">
<asp:Label ID="lblSubView2 " runat="server" Text="subview2" ></asp:Label>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
[/code]
in code behind
[code=vbnet]
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
If Not Page.IsPostBack Then
Dim index As Integer
For index = 0 To mView1.Views.Co unt - 1
Menu1.Items.Add (New MenuItem(mView1 .Views(index).I D, index.ToString( )))
Next index
Menu1.Items(0). Selected = True
End If
End Sub
Protected Sub Menu1_MenuItemC lick(ByVal sender As Object, ByVal e As System.Web.UI.W ebControls.Menu EventArgs) Handles Menu1.MenuItemC lick
mView1.ActiveVi ewIndex = Int32.Parse(e.I tem.Value)
End Sub
[/code]
I'm able to display the main menu but i'm unable to display submenu which is in view4
can any one giv some idea how to proceed with this
thank u
Archu
i have nested multiviews and used menucontrol to navigate throught views
this is my html code
[code=asp]
<asp:Menu ID="Menu1" Font-Bold="true" Orientation="Ho rizontal"
StaticEnableDef aultPopOutImage ="False"
OnMenuItemClick ="Menu1_MenuIte mClick" runat="server" >
<StaticMenuItem Style CssClass=MenuCe ll ItemSpacing=0px />
<StaticHoverSty le CssClass=MenuCe llHover/>
<StaticSelected Style CssClass=MenuCe llSelected ItemSpacing=0px />
</asp:Menu>
<asp:MultiVie w ID="mView1" runat="server" ActiveViewIndex ="0">
<asp:View ID="View1" runat="server">
<asp:Label ID="lblView1" runat="server" Text="U r in view1"></asp:Label>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:Label ID="lblView2" runat="Server" Text="U r in View2"></asp:Label>
</asp:View>
<asp:View ID="View3" runat="server">
<asp:Label ID="Label1" runat="Server" Text="U r in View2"></asp:Label>
</asp:View>
<asp:View ID="View4" runat="server">
<table>
<tr>
<td valign="top">
<asp:Menu ID="SubMenu1" runat="Server" Orientation="Ve rtical"
StaticEnableDef aultPopOutImage ="false"
OnMenuItemClick ="SubMenu1_Menu ItemClick">
<StaticMenuStyl e CssClass="MenuC ell" />
<StaticHoverSty le CssClass=MenuCe llHover />
<StaticSelected Style CssClass=MenuCe llSelected />
</asp:Menu>
</td>
<td>
<table>
<tr>
<td>
<asp:MultiVie w ID="SubMultiVie w1" runat="server">
<asp:View ID="SubView1" runat="server">
<asp:Label ID="lblSubView1 " runat="server" Text="u r in submenu"></asp:Label>
</asp:View>
<asp:View ID="SubView2" runat="server">
<asp:Label ID="lblSubView2 " runat="server" Text="subview2" ></asp:Label>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
[/code]
in code behind
[code=vbnet]
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
If Not Page.IsPostBack Then
Dim index As Integer
For index = 0 To mView1.Views.Co unt - 1
Menu1.Items.Add (New MenuItem(mView1 .Views(index).I D, index.ToString( )))
Next index
Menu1.Items(0). Selected = True
End If
End Sub
Protected Sub Menu1_MenuItemC lick(ByVal sender As Object, ByVal e As System.Web.UI.W ebControls.Menu EventArgs) Handles Menu1.MenuItemC lick
mView1.ActiveVi ewIndex = Int32.Parse(e.I tem.Value)
End Sub
[/code]
I'm able to display the main menu but i'm unable to display submenu which is in view4
can any one giv some idea how to proceed with this
thank u
Archu
Comment