| Alternate Row Colors ASP Script - ASP Web Pro |
|
ASP ScriptsALTERNATE ROW COLORSIf you need to display a long list of database records on your web page, it might be a good idea to alternate the colors of each row so that each record stands out and is easier to read. Here is an easy way to handle it. The first thing you need to do is create a database called
MyDatabase. Then create a table called tblData with these
fields: Then, start adding some data to your database. If you leave the database empty, the script will simply display a blank page. Next, create a page called alternaterowcolor.asp and copy the below code into your page:
This will display the first record in gray and the second record in white and will continue to alternate the color of each row displayed on your page.
|
|||
|
Main Menu Other Resources
Last Updated:
|
|||
|
© 1997-2008 ASP Web Pro, Inc. | Terms of Use
|