locked
are the "CSS Friendly Control Adapters" being used in ASP.NET 3.5 and above? RRS feed

  • Question

  • User-1920488700 posted

    I am a long time ASP.NET developer, but have just encountered the issue of CSS vs Tables in a deep manner (so far I have just used the built-in controls or just created my own controls).

    I bought a great book on this issue, but the book is reffering the ASP.NET 2.0 via VS2005.

    I am using ASP.NET 3.5 and above via VS2008/2010.

    My first question is: are the "CSS Friendly Control Adapters" still alive in 2010 or maybe there are a new techniques being used?

    My second question is:  are the "CSS Friendly Control Adapters" being used in ASP.NET 3.5 and above via VS2008/VS2010?

    I will appreciate your help and advise.

    Regards

    Yossi

     

     

    Saturday, August 14, 2010 8:22 AM

Answers

  • User1019938000 posted

    I use the friendly adapters, and yes the benefits are great IMO

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 1:16 PM

All replies

  • User560403387 posted

    The Css Friendly Control Adapters are still around, and are even in active development: http://cssfriendly.codeplex.com/ . In asp.net 4.0 default rendering has been updated to be more css friendly though, so there's less of a need for them in VS2010. Anything up to that point still benefits from the Css Friendly Control Adapters.

    Menno

    Tuesday, August 17, 2010 8:11 AM
  • User-1920488700 posted

    Hello Menno,

    Thanx for your reply.

    Actually, I made some tests via VS2010 + .Net 4.0 and it seems that the default (built-in) controls are still being rendered as tables ?!?!

    F.Y.I!

    So, as a result I have decided to use the latest version of the CSSFriendlyAdapters (created by brien demarzo) from now on also in VS2010 + .Net 4.0 and it works perfectly and even better then I have expected.

    Menno, how do I mark your answer as an accurate answer, so you will be rewarded for it.

    I did not find any link or button in the page in order to reward you.

    Yossi

     

     

    Tuesday, August 17, 2010 11:22 AM
  • User2117486576 posted

    Actually, I made some tests via VS2010 + .Net 4.0 and it seems that the default (built-in) controls are still being rendered as tables ?!?!

    I am not sure this is true for ALL controls (see Menu Control) but 4.0 does allow you to easily change this default behavior for many controls,e.g. Login Control.  Of course the gridview still renders a table since grids seem to be tables.

    http://blog.hmobius.com/post/2010/03/03/ASPNET-Part-9-Rendering-Cleaner-HTML.aspx

     

    google/bing for more articles.

    Tuesday, August 17, 2010 12:49 PM
  • User560403387 posted

    Yossi,

    I just created a new WebProject in VS2010, and the asp:Menu is rendered as a proper ul li a structure. Maybe you should verify your web.config has the controlRenderingCompatibilityVersion parameter set to 4.0 . I'm not entirely sure how to mark answers. I think there is a button by the post you want to mark.

    Menno

    Wednesday, August 18, 2010 4:02 AM
  • User-1920488700 posted

    Hi Menno,

    Thanx for your latest reply.

    I will make a test with the .NET 4.0 with <asp:Menu> control (the one that I actually use in my new project) and change the parameter in the web.config file - as you explained in your latest reply to me.

    One last question Menno, If I am using the .NET 4.0 in my new project and will be able to render the control as CSS and not tables (with your help) - does that mean that the CSS  Freindly Adapters are absolite and unusable in the project, or maybe there are still some benefits for using the CSS Friendly Adapters in .Net 4.0 projects? what would you do in this case?

    Menno, I am still trying to find a reward button on the page, but unfortunatelly I CAN NOT FIND ONE ?!?!

    maybe we should redesign this web site :)

     

    Best regards

    Yossi

     

    Wednesday, August 18, 2010 12:57 PM
  • User-1920488700 posted

    Menno, I have finaly found the "Marked As Answer" button and hopfully you will be rewarded on your reply to my question.

    Please let me know.

    The reward buttons are displayed only when I press the "Reply" button first in order to send you a reply. a bit strange if I might say.

    I will apressiate your professional anser to the latest question I sent you a few minutes ago and maybe you are able to alaborate a little bit on how exactly I should configure the web.config to render the .Net 4.0 controls as pure CSS controls.

    Yossi 

    Wednesday, August 18, 2010 1:10 PM
  • User-1920488700 posted

    Hi Menno,

    Thanx for your latest reply.

    I will make a test with the .NET 4.0 with <asp:Menu> control (the one that I actually use in my new project) and change the parameter in the web.config file - as you explained in your latest reply to me.

    One last question Menno, If I am using the .NET 4.0 in my new project and will be able to render the control as CSS and not tables (with your help) - does that mean that the CSS  Freindly Adapters are absolite and unusable in the project, or maybe there are still some benefits for using the CSS Friendly Adapters in .Net 4.0 projects? what would you do in this case?

    Menno, I am still trying to find a reward button on the page, but unfortunatelly I CAN NOT FIND ONE ?!?!

    maybe we should redesign this web site :)

     

    Best regards

    Yossi

    Thursday, August 19, 2010 8:35 PM
  • User560403387 posted

    Yossi,

    I'd say you probably will want to stick to the native rendering in .NET 4.0, if you've gotten it to render proper html. Control Adapters by their very nature will lack some functionality that can only be accomplished by access to the internals of the webcontrols, e.g. templated menu items in an asp:Menu .

    Menno

    Wednesday, August 25, 2010 5:59 AM
  • User1019938000 posted

    I use the friendly adapters, and yes the benefits are great IMO

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 1:16 PM