CSS Friendly Control Adapters now available on NuGet

Back in the days of Web Forms, there were server controls, and they generated rather CSS-unfriendly HTML. So, Microsoft got someone (Russ Helfand) to write adapters that changed their rendering to be more CSS-friendly: the “CSS Friendly Control Adapters” were born.

A little less farther back, in 2007, I tried convincing some people at Microsoft to let the community continue development of these adapters, and they agreed. The CSSFriendly CodePlex project was born, and a bunch of bugs and some new features were added.

A lot has changed since then, but the adapters still have use today for people stuck on .Net 2.0 (they’re in the top 200 most downloaded CodePlex projects, and their forums still see activity). To facilitate those who still use CSSFriendly, I’ve added the library package to NuGet.

How to use the CSSFriendly NuGet package

cssfriendly-nuget-packageIn four easy steps (three if you already have NuGet).

  1. First, you need Visual Studio 2010 and NuGet. (If you’re new to NuGet, read the getting started documentation.)
  2. Next, right-click the References folder and choose Add Library Package Reference.
  3. In the Add Library Package Reference window, search for “cssfriendly.”
  4. When you see the CSSFriendly package, click the Install button.

After it installs, the following is added to your project:

  • The CSSFriendly library reference
  • The CSSFriendlyAdapters.browser file in the App_Browsers folder

At that point, you’re ready to go!

The full source of the CSSFriendly library is still available at CodePlex: http://cssfriendly.codeplex.com. Downloads there include sample code and walkthroughs.

Enjoy, and let me know if you have any issues!

One thought on “CSS Friendly Control Adapters now available on NuGet

  • Henry Wyckoff says:

    I have been reading into css friendly control extenders — in particular menu and treeview.

    I am trying to use asp:menu to produce a clean UL without any classnames or styles. Just a clean UL so smartmenus can do its magic as designed.

    I’ve looked at the existing examples for CSS friendly and didn’t see a rendered UL without classes and styles. Maybe I just saw an old version?

    Anyway, I was hoping you might be able to point me in the right direction. I’ve posted questions on asp.net forum and stackoverflow but nobody’s bit yet.

    Thank you

Leave a Reply to Henry Wyckoff Cancel Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.