R
rockdale
Hi, all
I have an asp:menu in my master page. on my content page I have the
following code to programmly select the mainmenu.
Menu mMain = (Menu)this.Master.FindControl("menuMain");
mMain.Items[0].Selected = true;
It works fine.
The problem is, the datasource of this mainmenu from my database based
on the login confidential, so different user will has a different set
of mainmenu - which means the index of menu is different.
Can I set the selected based on the menu item text or can I find the
index of menuitem based on menuitem text?
Thanks a lot
-rockdale
I have an asp:menu in my master page. on my content page I have the
following code to programmly select the mainmenu.
Menu mMain = (Menu)this.Master.FindControl("menuMain");
mMain.Items[0].Selected = true;
It works fine.
The problem is, the datasource of this mainmenu from my database based
on the login confidential, so different user will has a different set
of mainmenu - which means the index of menu is different.
Can I set the selected based on the menu item text or can I find the
index of menuitem based on menuitem text?
Thanks a lot
-rockdale