[RESOLVED] Dynamic Menu items

Does anyone know how to set a selected asp.net dynamic menu item to false?  I have multiple menus and when someone selects an item from one of the dropdown menus it changes color.  If I were to select an item from a different menu I need the other menus not to have the selected option anymore.

You have to save Selected Menu Item ValuePath and access the item with that path to clear selection

public string SelectedMenuPath
        return Convert.ToString(ViewState["SelectedMenuPath"]);
        ViewState["SelectedMenuPath"] = value;

Create a property like that and save the selected path in Menu ItemClick event

protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
    //save selected path
    SelectedMenuPath = e.Item.ValuePath;

You can clear selection in any other event as

if (!string.IsNullOrEmpty(SelectedMenuPath))
    Menu1.FindItem(SelectedMenuPath).Selected = false;

2 thoughts on "[RESOLVED] Dynamic Menu items"

    http://buysingulair.webcam/ - singulair http://clomid.in.net/ - buy clomid online pharmacy http://buypropecia.date/ - propecia without a prescription http://buy-avodart.xyz/ - buy avodart

  1. http://buyserpina.xyz/ - buy serpina http://diclofenacsodec.top/ - diclofenac http://buyfluoxetine.loan/ - order fluoxetine http://strattera.site/ - strattera http://buy-buspar.ru/ - buy buspar http://buyfurosemide.date/ - buy furosemide http://provera.link/ - provera pills

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>