Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Constructor 2/22/2009 1:59 PM (edited 2/23/2009 12:19 AM)
I thought people may be interested in this. I have used CSS control adapters for years and I forgot that they were not in Cuyahoga! I became frustrated with the output and was wondering what was making it so frustrating to style and format my HTML.

As a solution to a post here the following may be of use.

BEAUTIFUL! Full control over HTML output!

I have added this to my custom solution and it works perfectly (so far )

1) Download this: http://www.codeplex.com/cssfriendly/SourceControl/ListDownloadableCommits.aspx (the latest one)
2) Build it as 'release' and add the 'CSSFriendly.dll' to the webs '/bin' folder
3) Copy the 'App_Browsers' folder to the 'Cuyahoga.Web' directory within your solution.
4) Rebuild the solution.
5) Check your html output. Brilliant! Clean!

I added the CSSFriendly solution to my customised Cuyahoga solution, put in build events to the correct '/bin'. Now I have full control over the html output over all controls.

The output from the solution is now CSSFriendly and clean and there is fine-grained control over html output.

A short note. You may wish to change the DTDs in the templates to avoid Explorers quirks mode. This threw me for a little while.

Besides that, the CSS adapters make it real easy to apply styles. Alternate rows in the gridviews etc.

I hope this is as helpful to others as I find it :)
# Constructor 2/24/2009 10:53 AM (edited 2/24/2009 11:07 AM)
Tested and work perfectly. Can not find any issues (so far ;) )

Breaking changes when adding to existing build? Only the removal of inline styles on controls rendered (which I avoid anyway).

Take a look how they clean up the html in these examples.

Details View Control XHTML Output
GridView Control XHTML Output

Classes are added for easy styling. Tables are used less.

If you add the project you can even control what XHTML is generated.

No more inline styles on the controls! Lighter markup hopefully.

I have been trying to work towards a situation where the developer has XHTML output, linked external CSS files and linked external JavaScript files as much as possible. It seems to be all there now.

# juanwoang 2/27/2009 6:31 PM
I see and feel very good from example link. But I was never use that, so I dont know should or not try it today.
# Constructor 2/28/2009 12:56 PM
juanwoangI see and feel very good from example link. But I was never use that, so I dont know should or not try it today.

Add the 'CSSFriendly.dll' to the webs '/bin' folder and 'App_Browsers' folder to the 'Cuyahoga.Web' directory within your solution. This will enable the CSS friendly markup rendering of controls.

If you do not like then simply delete the 'CSSFriendly.dll' and 'App_Browsers' folder from your solution. It is now back to normal.

I have done this many times as a test. I can not find any issue. If you are worried then simply backup your solution folder first. It takes less than 30 seconds to enable the CSSFriendly rendering! So you should check it out. I always use them now.
# juanwoang 2/28/2009 5:00 PM
Because of I'm a newbie to C# and CUY, too. You are ardour to help other people, like me! I'll try it tomorrow.