Here's a simple asp.net application that demonstrates customizing GridView header sort link.
1. Download and install Northwind database from codeplex.
2. Open the project and change the web.config connection string values to point your sql server and Northwind database.
Temporary connection string defined in web.config.
xml Code:
<add name="ConnectionString" connectionString="Data Source=yourdatasource;Initial Catalog=northwind;user=youruser;password=yourpassword;"
providerName="System.Data.SqlClient"/>
Note: Demo Solution in Visual Studio 2010. Database versions: SQL Server 2008/2012