ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

ASP.NET version of "Alternating Colors"

Just as the classic ASP version did, this sample uses a sample data source that it builds on the fly. I did this because the database connectivity is not really the point of this particular sample and I didn't want the DB code to confuse anyone. This also has the added benefit of making it so that the code will run without my needing to include a separate Access or XML file from which to retrieve the data.

You should also take note of tha fact that the formatting is handled completely by the grid itself. This is nice because this way when you want to change the look of the grid you don't need to worry about messing with your DB code. You can just change the attributes of the datagrid and you never have to get anywhere near anything else.

Here's a zip file of the code (1.2 KB).

Play with the running version.

View the live source code.

Back to the "Alternating Colors" sample


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers