Is it possible to apply CSS Adapters to a single specific control?

Can CSS Adapters be applied to a single specific ASP.NET control, or must these CSS Controls be applied Project wide?

Could someone provide an example / tutorial for a CSS Adapter being applied to a single ASP.NET control?

Thanks in advance,

2/12/2007 3:09:42 PM 905 articles. 0 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 39


You can disable the adapters on a per-control basis using AdapterEnabled="false", but in the documentation is remarked that this option is only experimental because the framework doesn't support disabling adapters on a per control basis.
Also you can modify the CSSFriendlyAdapters.browser file and comment the controls you don't want to get adapted, but of course it will affect the whole site.

Hope this helps,



Juan Barrera

Please remember to click "Mark as Answer" on this post if it helped you.
2/13/2007 2:33:24 AM


You expertise is greatly appreciated. Could you post a link or cut an excerpt from the documentation that pertains to the AdapterEnabled="false" attribute?

Thanks again, 

2/13/2007 1:18:18 PM

Hi Adam,

Here is a link to the CSS Adapters white paper, specifically the section you are looking for:

And, if you have the chance, the whole document is worth reading you if are using the adapters. 




Juan Barrera

Please remember to click "Mark as Answer" on this post if it helped you.
2/13/2007 7:49:17 PM

Hi Adam,

You need to do a new control for your tool box, you can do it, making a new class in a ClassLibrary, and with this you inheritance the properties of the tree view












public class MyTreeView : TreeView






When you done that, compile the class to generate the dll file. Then open the web form in the part of design,

next in your tool box select the part to put more items, in the browser select the dll you created, chose the

new control you made and you will see your control put it in the web and you will have a new tree view.


With this you only to change the next code in the CSS browser





adapter controlType="NewTreeView.MyTreeView"

adapterType="CSSFriendly.TreeViewAdapter" />




And with this you only change your new control and not the entire trees of your site, you can do the same with the other controls.


I hope this will help you.






3/7/2007 6:30:54 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'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, To deploy the adapters you do not ...

CSS Control Adapters
I was thinking to implement menu like on 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 - Free Classifieds (Search Over 5 mln jobs on DNN Direct Anybody can help?Rafal - Free Classifieds (Search Over 5 mln jobs on DNN Direct ...

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;  ...

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...

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...

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 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 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...

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...

CSS Control Adapters #2
HiI have downloaded the CSS adapters from, but how do I tell the menu to use the CSS? Cheers  Check this link check the tab, "Help" -> "Tutorials" Another Link 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...

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 helpRafal - Free Classifieds (Search Over 5 mln jobs on DNN Direct  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, t...

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 class for a specific control type in css file
hi,I have a question (might be wired). I am building a web application. I want to know how I can apply a css class to all controls of gridview type in my application same as we do for we do for any html control. Is it possible? If yes then how?Sharique udddin Ahmed FarooquiWeb Developer Please mark it as answer if it resolves the issue. You might want to investigate using Theme and Skin for that purpose.  First, create a css class for your Gridview control. Create a Skin for your gridview control and set the cssclass attribute to the css class you have created. http://msdn2.mi...

Web resources about - Is it possible to apply CSS Adapters to a single specific control? -

Amazon, Walmart Black Friday 2015 Ads: Sale Deals Are Not Just 4K TV Sales, ‘Star Wars’ Fans Rejoice
Both Amazon and Walmart’s Black Friday 2015 ads may have electronics eager to jump on one of the 4K TV deals, but there are actually a variety ...

NBC’s Thanksgiving Parade Coverage Launches With Gloria Estefan Musical ‘On Your Feet!’
Already looking like a hit with Broadway theatergoers, newcomer On Your Feet! — the biotuner about the courtship and rise to superstardom of ...

Kylo Ren Faces His Greatest Test in Yet Another New Star Wars: The Force Awakens TV Spot
Yes, you’re about as surprised as I am—there’s even more new footage from The Force Awakens in this new TV spot, just posted by the Star Wars ...

Trump, Rubio and Cruz
Ezra Klein interviews political scientist Alan Abramowitz : I certainly don’t think [Trump is] a strong favorite, but there’s no way of really ...

Turkey accuses Russia of SLANDER for saying they buy oil from ISIS
Recep Erdogan lashed out at claims by Russia that his country buys oil from ISIS calling them slander as the fallout continues over the Russian ...

Paris attacks victims’ relatives boycott France's day of mourning over ‘government fault’
Families of those slaughtered during the Paris terrorist attacks today called for a boycott of a day of mourning after accusing the French government ...

Raspberry Pi's latest computer costs just $5
The British company is making learning to code as affordable as a skinny latte.

Happy Thanksgiving, tweets Washington NFL team
Newton once theorized that, in addition to the law of universal gravitation, there was another invisible force at work in our world: This force ...

The Giant Inflatable Balloons Terrorizing New York City, Ranked
Thanksgiving is a day to give thanks for family, friends, and the bounty of food that this good Earth pushes out of its belly each year for us. ...

Frank Gifford’s Family Says CTE Found In Brain, Still Supports NFL
Late NFL Hall of Famer Frank Gifford was suffering obvious symptoms of chronic traumatic encephalopathy, his family said, and donated his brain ...

Resources last updated: 11/26/2015 4:04:55 PM