Ok, Most of the posts from now on will be about ASP.NET 2.0. I must say though I didn’t really expect to switch so fast. I really liked 1.1, sort of, and was comfortable with it. So I thought I would be forced into 2.0, but nope I am loving it. So rarely will I post on 1.1 unless I have a project that requires it, like under Linux. So that is to let you know what is going on there.
So lately I have been reading up on CSS and some of the virtues of it and am really impressed by CSS. Once you play with it for a while you get comfortable with it and can actually start doing interesting things with it. Now I am sure what I am doing now for integrating it into ASP.NET 2.0 is just hacking it in there, but hey it works.
One of the easiest ways to implement it in 2.0 is with the DataList, because it is all that I have tried so far. When you bind the DataList, which is super easy now, it automatically creates the labels and binds data to it no more having to go in by hand to do that. Well all you have to do to use CSS on it is open up the HTML add div apply an id from the CSS file and voila done it comes out pretty.
Now why would you want to do that instead of just applying font properties?
Well now to edit all I have to do is edit the CSS file. It will cut my maintenance time down by quite a bit. A book I suggest is the Zen Garden CSS book, or the site. I wish I had taken my own advice, once again, a long time ago and learned CSS.
If you don’t know CSS and are a web developer either professionally or as a hobbyist I suggest you learn it right a way. Once you get past the learning curve it makes life more bearable.