<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CSS Friendly Control Adapters</title><link>http://forums.asp.net/1018.aspx</link><description>Discuss the CSS Friendly Control Adapters sample project, ask questions, post bugs, etc</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Limit the scope of control adapters</title><link>http://forums.asp.net/thread/3237244.aspx</link><pubDate>Tue, 16 Jun 2009 14:08:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3237244</guid><dc:creator>SippyCup</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3237244.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=3237244</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Okay, it finally works. The last piece of the puzzle was the @Register directive. This page helped me figure that out: &lt;a href="http://www.vbinfozine.com/a_aspnet_derived_ctl.shtml" title="http://www.vbinfozine.com/a_aspnet_derived_ctl.shtml" target="_blank"&gt;http://www.vbinfozine.com/a_aspnet_derived_ctl.shtml&lt;/a&gt;&lt;/p&gt;&lt;p&gt; Here are the steps I took:&lt;/p&gt;&lt;p&gt;1. Create a new class that inherits the control you want (modeled after the menu class in the OrbitOne example posted above)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;I just included this as part of my CSSFriendly project, and within the CSSFriendly namespace.&lt;/p&gt;&lt;p&gt;2. Modify the *.browser file to point to the new class (i.e., CSSFriendly.Whatever)&lt;/p&gt;&lt;p&gt;3. To use the control on a page, the @Register directive looks like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;lt;%@ Register TagPrefix = &amp;quot;tag&amp;quot;&lt;br /&gt;  Namespace = &amp;quot;CSSFriendly&amp;quot;&lt;br /&gt;  Assembly = &amp;quot;CSSFriendly&amp;quot; %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Namespace is the namespace in which your new control resides. Assembly is whatever *.dll contains the code. In my case, since I made my control part of the CSSFriendly project, both of these are CSSFriendly. I&amp;#39;m happy to provide any assistance if you decide you want to use this solution (you probably won&amp;#39;t have any problems with it.. I feel like the @Register problem I had was pretty amateurish, but I&amp;#39;m a C++ programmer by nature &lt;img src="http://forums.asp.net/emoticons/emotion-4.gif" alt="Stick out tongue" /&gt;).&lt;br /&gt;</description></item><item><title>Re: Limit the scope of control adapters</title><link>http://forums.asp.net/thread/3237180.aspx</link><pubDate>Tue, 16 Jun 2009 13:48:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3237180</guid><dc:creator>SippyCup</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3237180.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=3237180</wfw:commentRss><description>&lt;p&gt;Ugh. Yeah, that could probably be done. I feel like there&amp;#39;s an easier solution, but feelings aren&amp;#39;t going to help. I&amp;#39;ve tried implementing the only solution I&amp;#39;ve come across--inheriting from the ASP .NET server controls and associating the adapters with the new controls. However, I must be doing something wrong, because I keep getting the error that my control &amp;quot;&lt;span class="alert"&gt;is not allowed here because it does not extend class &amp;#39;System.Web.UI.UserControl&amp;#39;.&amp;quot; I&amp;#39;m not sure what to make of that, since my new DataList inherits the DataList exactly the way the previous example&amp;#39;s menu inherits from Menu.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This solution isn&amp;#39;t perfect, but it allows you distinct control over which Controls are adapted and which aren&amp;#39;t... that is, if I could get it to work. :(&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Limit the scope of control adapters</title><link>http://forums.asp.net/thread/3235790.aspx</link><pubDate>Tue, 16 Jun 2009 04:33:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3235790</guid><dc:creator>Myster</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3235790.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=3235790</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I would like to exclude the adapter from certain &amp;#39;folder&amp;#39; or &amp;#39;url&amp;#39;&lt;/p&gt;&lt;p&gt;because I don&amp;#39;t want to have to change all the attributes on half of the site. :-) &lt;/p&gt;&lt;p&gt;I suppose I could update all the CSS friendly adapters to check the url, and use thier own render or the base.render depending on that.&lt;/p&gt;&lt;p&gt;then write some kind of configuration into the web.config. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Limit the scope of control adapters</title><link>http://forums.asp.net/thread/3229232.aspx</link><pubDate>Fri, 12 Jun 2009 18:13:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3229232</guid><dc:creator>SippyCup</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3229232.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=3229232</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hey Murray. I&amp;#39;ve been searching for a way to do exactly the same thing. Judging from what I&amp;#39;ve found, the thought you had is exactly what you have to do. See the last post in this thread on CSS Friendly&amp;#39;s CodePlex page: http://cssfriendly.codeplex.com/Thread/View.aspx?ThreadId=15361&lt;/p&gt;&lt;p&gt;&amp;nbsp;It would be nice if we could have something as simple as a property for a base class like Adapted=&amp;quot;True&amp;quot; or &amp;quot;False.&amp;quot;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Limit the scope of control adapters</title><link>http://forums.asp.net/thread/3146107.aspx</link><pubDate>Wed, 06 May 2009 23:06:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3146107</guid><dc:creator>Myster</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3146107.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1018&amp;PostID=3146107</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi&lt;/p&gt;&lt;p&gt;I have a website consisting of a 3rd party CMS (lots of admin pages) and a lot of templates.&lt;/p&gt;&lt;p&gt;I&amp;#39;d like the adapters to apply to my templates but no to the admin pages.&lt;/p&gt;&lt;p&gt;Is there a way to limit the scope of the adapters?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The only way I have thought of is to create new Types that inherit from the base asp control and then associate the adapter with those sub-types, but that seems like a big ugly hack to me.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cheers.&lt;/p&gt;&lt;p&gt;Murray. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>