Excluding control from CSS Adapter

I use menu in two places in the website: Main menu and User Menu. While I want to use CSS Adapter for Main menu, I do not want to use CSS Adapters for USer menu. It is the same tag in both places: asp:menu.

Please help

Zikbay.com - Free Classifieds
(Search Over 5 mln jobs on Zikbay.com)

DNN Direct
1/23/2008 2:05:06 AM
asp.net.css-control-adapters 905 articles. 0 followers. Follow

6 Replies

Similar Articles

[PageSpeed] 46

 According to this book:

 "...once you set up your adapters to run in your project, there is no real way to turn them off. It's not as if you can say "okay, GridView1, you use the adapters. But GridView2? No way; I want to style you myself" If they are on, they are on. If they are off, they are off"

 He goes on to say:

 "The quasi-exception to that is the use of another non-standard property: AdapterEnabled", and "this is only there for experimentation Will it work? Don't know"

In the CSS Adapters white paper:

"Beware: this is not supported and often does not work well. Fundamentally, the framework does not support disabling adapters on a per control basis. The AdapterEnabled attribute is only intended to be used experimentally"


Its not exactly good news, but I hope it answers your question.


1/24/2008 7:32:13 PM

What about skinning (with different CSS) two different controls (same type - menu) using table adapters? Is that possible?

I bought the book... :)

Zikbay.com - Free Classifieds
(Search Over 5 mln jobs on Zikbay.com)

DNN Direct
1/24/2008 10:04:53 PM

Yep. I believe you just set the CssSelectorClass property differently on each menu. Like this:

<asp:Menu CssSelectorClass="AdminMenuStyle".......


<asp:Menu CssSelectorClass="UserMenuStyle".......

1/24/2008 11:30:10 PM


What I meant, will it use different CSS adapter? There is standard Menu CSS adapter coming with CSS Adapters Toolkit, I also have customized version of Menu adapater. I would like to use them both for different controls. Is that possible?
Zikbay.com - Free Classifieds
(Search Over 5 mln jobs on Zikbay.com)

DNN Direct
1/25/2008 12:03:40 AM

I don't think so - I mean, you still only have one <asp:menu> control. I'm not completely sure on this one, but it doesn't seem likely.


1/25/2008 4:00:13 PM

It is possible, but the solution is not very elegant:

Create a new control, call it something like MyMenu, and inherit from System.Web.UI.WebControls.Menu. Then in your browser.compat file, set your custom CSS adapter to adapt the MyMenu control (and leave the CSS Friendly adapter on Menu, or vice-versa). 

Actually, now that I think about it you may need to create a second custom control, again inheriting from System.Web.UI.WebControls.Menu, and have the CSS Friendly adapter act on that control (Rather than directly on System.Web.UI.WebControls.Menu). Let me know if this doesn't work out, and I'll go back to some of my old code that does this and see how I did it (I am having trouble remembering now).



1/25/2008 11:34:42 PM

Similar Artilces:

Is CSS Control Adapters compatible with WebPart and WebPartZone controls?
Both WebPart and WebPartZone ultimately derive from WebControl, so it seems like this would work, but before I got into it deeply, was curious if anyone had tried it and if there are any issues? I don't think there is an esay way to make it works. This was a reply from Scott Guthrie: Unfortunately I don't think there is a super easy way to override WebParts -- since some of the layout does assume tables (since the CSS to-do this positioning with divs isn't super easy).  We are going to look at whether it is possible to build another control adapter for webparts in the f...

Reagrding using FILTER in (MenuExample.css) CSS adapter classes for Menu control
Hello everyone, Whenever I use filter: in any of the CSS calss for the MENU control using CSS adapters, it only renders the first level of the menu, all subsequent levels are not even displayed. I want to use filter for some transparency effect, but using it is not rendering any child menu's. Following is a example - .PrettyMenu .AspNet-Menu-Vertical { position:absolute; top: 87px; left: 0px; width:200px; z-index: 300; filter:alpha(Opacity=50); } Now it only shows first level and rest of the menus are not displayed, if I remove filter, it works fine but without transparency. Rep...

CSS Control Adapters
I was thinking to implement menu like on www.auctiva.com using CSS Control Adapters. How would I do it?The enu would have two bars:1) Main bar - tabs 2 Second bar with submenu items, all links horizontallyRafal Zikbay.com - Free Classifieds (Search Over 5 mln jobs on Zikbay.com) DNN Direct Anybody can help?Rafal Zikbay.com - Free Classifieds (Search Over 5 mln jobs on Zikbay.com) DNN Direct ...

CSS control adapters
I've just seen another thread mentioning these which reminded me that I couldn't install the blighters. A couple of questions first tho.  The VSI file that I download won't load/install, it comes up with "string cannot have zero length".  ANybody any ideas on what may be going wrong? Second question is on how these get deployed on my remote server, will I be able to use them without access to the core asp library directories (if that makes sense). To fix the VSI installer problem, see this posting, http://forums.asp.net/thread/1492405.aspx. To deploy the adapters you do not ...

Trouble controlling .net controlls with CSS
 I am trying to control the :hover css property on <asp: Button> controls. Basically the css is working correctly to set the initial look of the button, but nothing is happening when I hover over the button. Here is my code:CSS:.sidebarButton{    width: 168px;     height: 45px;     background-color: #666666;     text-align: left;    font-weight: bold;    font-family: Century Gothic;    font-size: 13pt;    color: White;    border-style: none;  ...

Menu Css Control Adapter
  Hi everybody, i have been working with menu css control adapter of .net 2.0, but i'm having some troubles to use it. I have a vertical menu and in forward of the menu i have a swf file (Flash). what happens is that the menu it appears in the back of the swf file and it's menu subitems is  unreachable.   How can i fix it???? Please Someone ...... Thanks in advanced... I had the same problem with my menu not displaying from my master page over the top of image in the content place holder, i got around this by putting the menu and the content in DIV with the correct Z-...

CSS Control Adapter for Gridview
I am tryin to style a gridview.My site is using CSS Friendly control adapter. I am new to this. Can u guys pls help me make the gridview look better. Every time i add a div tag,i get an error that div is not a property of the gridview.If i put it to envelope the gridview, nothin happens!! Thanks.  If you left the (ID) of the GridView as GridView1 then you should be able to find <div class="AspNet-GridView" id="GridView1"> in the source when you run the page.   You can use the class to style the GridView.  You should also be able to find ot...

TreeView and CSS Control Adapters
Hello All,I am using CSS control Adapter for my TreeView. The Intention is to emit <ul> and <li> tags instead of tables.But I am getting this error************************************************************************************** **************************************************************************************Server Error in 'xyz' Application. The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). Description: An unhandled exception occurred during the execution...

CSS Adapters effecing other controls?
I'm using the css adapters to style the menu. It works fine. BUT: in other parts of the site, in pages without any css-friendly related stuff, menus and gridviews look wierd. Totaly different from the way they used to be before I added the css friendly adapters. I'm almost sure there is a connection. How can I make sure that a specific menu is NOT affected by the adapters? Thanks,Gili   I found this on the CSS Friendly adapters website whitepage: Disabling Adapters If you explicitly add AdapterEnabled="false" to your server-side tag, these sample adapters will attem...

CSS Unfriendly Control Adapters
I don't find these  so-called CSS friendly adapters. I'm very good using css, but I'm like working in design view the most so I can see my design as I create sites. However, design view is useless when using these controls.  I'm having extreme difficulties when using Ajax also. Am I wrong, or is it just that I'm using Visual Studio 2008 Pro to develop sites using asp.net 3.5?I just purchased VS Pro with a MSDN Subscription and paid about $3500. What a disapointment that the native controls adds everything in tables, and the CSS Friendly Controls are difficult to...

Wizard Control and CSS Adapters
Has anyone dealt with the wizard control and CSS Adapters?  I tried to create one myself, but it seems to mess with the datalist adapter already in place. If anyone has any thoughts or suggestions, that would be greatly appreciated. Thanks, Nichole...

CSS Control Adapters #2
HiI have downloaded the CSS adapters from http://www.asp.net/cssadapters/, but how do I tell the menu to use the CSS? Cheers  Check this link http://www.asp.net/CSSAdapters/Default.aspx check the tab, "Help" -> "Tutorials" Another Link http://weblogs.asp.net/scottgu/archive/2006/05/02/CSS-Control-Adapter-Toolkit-for-ASP.NET-2.0-.aspxblog.budigelli.com Hey bopo, Ravi...Is totally right but sometimes a simple answer can really help. Once you have added the neccesary files to your project, in source view add (CssSelectorClass="PrettyMenu"&n...

What is the advantage of the CSS control adapter for the gridview?
 The Grid View has built in styling capabilities with the "HeaderStyle-CssClass" and the "ItemStyle-CssClass" attributes.  Why sould someone want to use the CSS Friendly Control Adapter for this if it has this built in capability?  The html that it produces via the adapter doesn't seem that much better than the html that it produces normally.  Is the only reason to use the adapter on the Grid View so that the output can be manually changed?  For instance,  the table that is put out by the Grid View can canged into <divs>.  ...

How do I use CSS Friendly Control Adapters
I’ve been reading a lot on the CSS Friendly Control Adapters and I getting a lot of conflicting and confusing information.   There seems to be two approaches to the use of these which appears to derives from there being two implementations. An older version which involved running a vsi file which I can’t seem to find in the package. And a later method which seems to only involve adding a refrence to the dll file and adding a App_Browsers folder and placing the CSSFriendlyAdapters.browser file in the folder.  Here’s an example, I’m looking at a page from this site, “ASP.NET 2.0 ...

Web resources about - Excluding control from CSS Adapter - asp.net.css-control-adapters

School chaplaincy program: government stands firm on excluding welfare workers
Schools in NSW will be given funding for religious chaplains but not qualified secular youth workers after the Federal Government refused to ...

China hails Confucianism without excluding other cultures
China hails Confucianism without excluding other cultures People's Daily Online These cultures are believed to help modern people find spiritual ...

Why Excluding Marketers from the Ad-Tech Boom Is a Failed Strategy
... 1976 movie "Network." I was jolted to face the disturbing reality that because ad tech was created in a tech/VC echo chamber, largely excluding ...

Girl Scouts turn down $100,000 gift for excluding 'boy-girls'
The Girl Scouts turned down a $100,000 gift that was conditioned on it not being used to support "transgenderism." The Scouts felt it was too ...

Samsung Galaxy S II Sales Hit 10 Million, Excluding The U.S.
We already know the Samsung Galaxy S II (SGSII) is a huge success (even compared to the original SGS), but now sales of the uberphone have been ...

"The U.S. military will end its policy of excluding women from combat, officials said."
"Defense Secretary Leon Panetta will announce Thursday plans to open combat jobs and direct combat units to female troops, multiple officials ...

Gmail's Option for Excluding Chats from Search Results
Gmail's advanced search box has a new option: "don't include chats". If you click the checkbox, Gmail will append to your query: "-in:chats". ...

UK PSNCR Net Borrowing Excluding Financial Interventions Analysis - UKPSJ5II - Bloomberg
Analysis & trends for UK PSNCR Net Borrowing Excluding Financial Interventions (UKPSJ5II) including current rate, chart, profile, news and other ...

Theme of Lexington High’s ‘American Pride’ Dance Changed for Excluding Other Nationalities
Students are taking issue with Lexington Public Schools changing the theme of an ‘American Pride’ dance.

Sprint Nextel Boosts Bonuses by Excluding Cost of Apple IPhones
Sprint Nextel Corp., which sells Apple Inc.’s iPhone at a loss, says it excluded the device’s cost from its 2011 bonus calculations for eligible ...

Resources last updated: 12/11/2015 2:54:19 AM