<asp:HyperLinkField DataNavigateUrlFormatString="Detail.aspx?id={0}"
DataTextField="id" HeaderText="ID" DataNavigateUrlFields="id" >
<ItemStyle HorizontalAlign="Center" Width="40px"/>
<HeaderStyle HorizontalAlign="Center" Width="40px" />
</asp:HyperLinkField>
转载于:https://www.cnblogs.com/QiuJL/archive/2011/08/08/4524338.html