I'm sorry,I assumed you were familiar with creating user controls.
Let's start from the beggining:
Open your project, then:
File>Add>New Project
From the New Project Wizard choose: "Web Control Library"
Let's call it: "CustomControls"
Add a new "Web Custom Control" Item to this project.
Let's call it: "CSSGridview"
In CSSGridview.cs:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
namespace CustomControls
{
public class CssGridView : GridView
{
}
}
Now left click on your Website Project and select: "Add reference..."
In the "Add reference" wizzard select the tab "Project". The project we just added ("CustomControls") should appear in there, select it and click "OK".
Add the following line into your Web.Config file (I indicated also in which section it should be inserted):
<system.web>
<pages>
<controls>
<add TagPrefix="cc" assembly="CustomControls" namespace="CustomControls"></add>
</controls>
</pages>
</system.web>
Now you are ready to go, each time you want to use the CSS Adaptered gridview you juste have to write:
<cc:CSSGridView></cc:CSSGridView>
Ah ! And by the way, now that you have two projects in your solution do not forget to always compile the "CustomControls" project first ! (Right click on any one of the projects and select "Project Build Order...") That's because your website uses the dll that will only be generated when you build "CustomControls". If you forget to do it you may have building errors.
Well, that's all. I admit it can seem a little bit complicated but believe me, creating a library of custom controls is a very common task :-)
landhar