Menu control keep menu item selected

Last post 02-21-2006 3:30 PM by dannychen. 1 replies.

Sort Posts:

  • Menu control keep menu item selected

    02-21-2006, 9:55 AM
    • Member
      110 point Member
    • jradi
    • Member since 11-29-2002, 9:38 AM
    • Posts 25

    Hi Everyone,

    I've been using the menu control for navigation within my application using the web.sitemap, everything works fine except when I click on a hyperlink within the page, the selected menu item within the menu control is no longer selected. Is there a way to keep the menu item selected even though I click on a hyperlink within the page?

    Not sure if this is a good solution, but I was thinking to store the current node within a viewstate and then retrieve on the nect page load (not sure if this will owrk, it's just a theory).

    Thanks,

    IJ

     

  • Re: Menu control keep menu item selected

    02-21-2006, 3:30 PM
    • Contributor
      4,347 point Contributor
    • dannychen
    • Member since 08-24-2004, 8:17 AM
    • Redmond, WA
    • Posts 840
    • AspNetTeam
      Moderator

    IJ,

      Since you are clicking on a hyperlink, you are navigating to another page (it's the same as typing a new url into the address bar).  Obviously, this will clear ViewState since you are not posting back to the same page.  However, SessionState is preserved on the server.  You could, in theory, preserve some of this information in session state and retreive it on the next request.

    --
    Danny

    disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
Page 1 of 1 (2 items)
Microsoft Communities