0

can any one tell me how to get the seleted submenuitem value of menu in textbox. like
foe eg this is my menu
Home Course
-Commerce
-Science

i want when i select science in menu control then textbox should me the Science. any one help me
i'm apppriciate. :)
thank you

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by pritesh2010
0

Markup

<form id="form1" runat="server">
    <div>
        <asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick">
            <Items>
                <asp:MenuItem Text="A" Value="A">
                    <asp:MenuItem Text="B" Value="B">
                        <asp:MenuItem Text="C" Value="C"></asp:MenuItem>
                    </asp:MenuItem>
                </asp:MenuItem>
            </Items>
        </asp:Menu>
     </div>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </form>

code-behind

protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
    {
        Label1.Text = e.Item.Value;
    }
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.