<Asp: GridView ID = "grdSent" runat = "server" AllowPaging = "True" AutoGenerateColumns = "False" OnPageIndexChanging = "grdSent_PageIndexChanging">
<Columns>
<Asp: CommandField ShowDeleteButton = "True"/>
<Asp: BoundField DataField = "uniqueID" HeaderText = "uniqueID" Visible = "False"/>
<Asp: HyperLinkField DataNavigateUrlFields = "uniqueID" DataNavigateUrlFormatString = "~ /BBS/fckeditor. aspx? Fck = {0} "DataTextField =" subject "HeaderText =" topic "/>
<Asp: BoundField DataField = "mailFrom" HeaderText = "sender"/>
<Asp: BoundField DataField = "sendTime" HeaderText = "sending time"/>
</Columns>
</Asp: GridView>
With multiple parameters: <asp: HyperLinkField DataNavigateUrlFields = "parentid, id" Text = "sub-directory" DataNavigateUrlFormatString = "productchildren. aspx? Pid = {0} & id = {1} "HeaderText =" view sub-directory "/>
Another background Writing Method: [original Vegas] <asp: TemplateField HeaderText = "form name">
<ItemTemplate>
<Asp: HyperLink ID = "HyperLink1" runat = "server" Text = '<% # Eval ("FORM_NAME") %>'> </asp: HyperLink>
</ItemTemplate>
</Asp: TemplateField>
Protected void GridView1_RowDataBound (object sender, GridViewRowEventArgs e)
{
// Do many things before they are invisible ~ ~~~
If (e. Row. RowType = DataControlRowType. DataRow)
{
// Link ~
(HyperLink) e. row. cells [1]. findControl ("HyperLink1 ")). navigateUrl = string. format ("javascript: void window. open ('HTTP: // DTSFLOWER/module/mailroute. aspx? FORM_KIND = {0} & FORM_NO = {1} & FORM_APPROVE_ID = {2} & LOGON_ID = {3} & MAIL_TYPE = {4 }');",
E. row. cells [2]. text, e. row. cells [0]. text, e. row. cells [3]. text, e. row. cells [4]. text, e. row. cells [5]. text );
// Tip ~
E. Row. Cells [1]. ToolTip = "Form Number:" + e. Row. Cells [0]. Text;
// VISIBLE = FALSE ~~~
For (int I = 0; I <e. Row. Cells. Count; I ++)
{
If (I! = 1)
{
E. Row. Cells [I]. Visible = false;
}
}
}
}