Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,
you can get menu item value by calling Menu1.SelectedValue, but i want to get selected value for child item, how can do that ? i am using asp.net C#
thanks in advance
Posted
Updated 26-Apr-13 10:22am
v2

check for Menu2.SelectedIndex
it would solve the answer
 
Share this answer
 
Comments
Salah Abualrob 26-Apr-13 16:24pm    
there is no property called SelectedIndex !
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{

e.Item.Value;
}


check this one.

or else


protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
int index_no = 0;
for (int i = 0; i < Menu1.Items.Count; i++)
if (e.Item.Text == Menu1.Items[i].ToString())
{
index_no = i;
break;
}

}
 
Share this answer
 
Comments
Salah Abualrob 26-Apr-13 16:59pm    
thanks bro :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900