SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Learning...
    Join Date
    Jan 2003
    Posts
    781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Building and displaying a menu - unordered list

    This is classis asp.net 4 application, not an mvc application. I need advice setting up the navigation...

    I already have navigatyion as List<T> nodes (name, description, url)

    Some nodes may have child nodes (only one level) and show on mouse over.

    I have the css and js in place and working great with static test navigation. I need advice about

    1. Should i use a menu control or a nested repeater control. The nested one is for the child item?
    2. I need to apply a class to parent ul and to parent li that has a child ul.
    3. I need to apply a "select" class to the parent li to show it as a selected node if the page showing is the same or is from under child nodes.

    I need a kick in the right direction.

    A sister application is in mvc, should i call an action that returns a partial view? Both are under the same domain...
    Thanks
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  2. #2
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I used a nested ListView for this very purpose. My computer is down though and I don't have access to the files for a few days.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the menu controller and bind the data to your data source

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    For classic, I would use a repeater at most -- no need to do anything more than write the list. We actually used XSLT back when we were doing web forms -- it was cleaner and quicker and made it easier to handle infinite nesting.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •