Showing posts with label dynamic rule. Show all posts
Showing posts with label dynamic rule. Show all posts

Wednesday, 11 April 2012

ASP & CSS: dynamic style rules for database items

   


If you work a lot with ASP and get data from databases, you might have been in need of creating different CSS rules for each item in a recordset.
We can create dynamic CSS rules with a simple loop, assuming we know the number of items to which we will apply the rule. The point is that we don't know how many recordset items we will get from the database, but we can create rules according to different situation, as I will explain shortly.

Now follow me and see what we can do.