locked
Disable adapter for one of the menu controls on the page. RRS feed

  • Question

  • User1485238302 posted

    I have two menu controls on the page, one for main navigation at the top and the other in the footer. Is there a way to disable the CSS adapter for the menu control in the footer while still using it for the one in the main navigation. I am aware that I can write some CSS for the one in footer to make it different from the one in header, but I was hoping to disable it.

    Monday, August 11, 2008 8:28 AM

Answers

  • User-1856974186 posted

    You can set AdapterEnabled="false" on the control itself to disable the adapter for that instance. It's apparantly not officially supported (so Iread), but I've used it for a FormView and had it working fine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 18, 2008 1:44 PM

All replies

  • User968307270 posted

    hey Max, 

    I don't usually try to answer posts of people who have a monster load more points than I [:)] but... as far as i know it is not possible to disable the css adapters on a per-instance basis...just across the board in the browsers file.

    Mausy

    Monday, August 11, 2008 11:03 AM
  • User1485238302 posted

    I don't usually try to answer posts of people who have a monster load more points than I

    Hey...those points mean nothing when it comes to knowledge, so don't get carried away by them. I consider answers given by members with 0 points equally important to those given by high rankers here.

    as far as i know it is not possible to disable the css adapters on a per-instance basis...just across the board in the browsers file

    I was really afraid of that. I know we can modify browser file to enable or disable adapters, but it seems like it's either all or nothing. Too bad...

     

    Monday, August 11, 2008 11:24 AM
  • User-1385398420 posted

    Here's my suggestion: 

    1. Create a new class, called CssMenu, and inherit from the default ASP.Net Menu class.
    2. In your .browsers file, specify the CssMenu class as using the adapters instead of the default ASP.Net Menu class.
    3. When you want a CSS-adapted menu, use your CssMenu class. The normal ASP.Net Menu will retain its default behavior.

    Friday, August 15, 2008 9:14 PM
  • User1485238302 posted

    Thanks. Let me work on it.

    Monday, August 18, 2008 8:10 AM
  • User968307270 posted

    Great solution bdemarzo! I had been trying to do the same as max but having failed at the first hurdle just gave up!

    Must give this a go...

    Mausy 

    Monday, August 18, 2008 8:33 AM
  • User-1856974186 posted

    You can set AdapterEnabled="false" on the control itself to disable the adapter for that instance. It's apparantly not officially supported (so Iread), but I've used it for a FormView and had it working fine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 18, 2008 1:44 PM
  • User1485238302 posted

    You can set AdapterEnabled="false" on the control itself to disable the adapter for that instance. It's apparantly not officially supported (so Iread), but I've used it for a FormView and had it working fine.

    Fabulous...thank you so much Dave.

    Monday, August 18, 2008 1:58 PM