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

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
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


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

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