Share on Twitter
Note:
This is ported from my old weblog. Originally published June 22, 2006

First, I assume here that you know themes and read about them, but are a bit afraid or unfamiliar with using them. If you don’t know what are Themes and skins in ASP.NET 2.0, check their section on MSDN as well as this great article (another one).

Do you know that…

  • Do you know that you can provide intellisense to skin files in VS2005? Simply go to Tools menu, click Options, and from the tree in the left, expand the node "Text Editor" to  click it’s sub node "File Extension". In the "Extension" text box, write "skin", and select "User Control Editor" from the "Editor" drop down, click add, and then OK.
  • Do you know that ANY stylesheet existing in the folder of the current "Theme" or "StylesheetTheme" is inked on rendering? Not just the stylesheet with the same name of the Theme, and not only when you’re using the theme as "StylesheetTheme" as some believe.
, ,
Share on Twitter

This is a well commented example for a GridView with implementation of RowDataBound and DataBound events. I also demonstrate in it some of the important properties of GridView, like the slight diffrences when dealing with Grid Paging, Rows, Cells, and Columns. I prefered to heavily comment the code than to write separate paragraphs describing it as I do believe that the code is what gets the idea in a direct way.

The example is a simple page that uses SqlDataSource to connect to a SQL Server 2005 Express database and show the results on a GridView with paging capapility. Many parts of the code don’t show the best practices for their situation and those are only included for demonstration purpose as they are not the main focus of the example.

, , , ,