<asp:GridView ID="Griddata" runat="server" AutoGenerateColumns="False" CellPadding="1" GridLines="Horizontal" Width="1000px" ShowFooter="True" CssClass="grid" AlternatingRowStyle-CssClass="alt"> <Columns> <asp:HyperLinkField HeaderText="ID" DataTextField="rec_id" DataNavigateUrlFields="rec_id" DataNavigateUrlFormatString="followme.aspx?record={0} " /> <asp:BoundField HeaderText="Login" DataField="LoginName"></asp:BoundField> </Columns> </asp:GridView>
This is an example of a gridview defined in ASP.NET
You must specify <asp:Hyperlinkfield> in the column definition.
In this field you need to specify the DataTextfield (which will be displayed on the screen in this column), your URL ( DataNavigateUrlFormatString ) and your parameter that you want to use in the URL ( DataNavigateUrlFields )
Note. I am attached to this grid from the code, and not through SqlDatAdaptor , but the result is the same.
You will get something like this:

Kriz source share