<asp:GridView ID="repTran" runat="server" AutoGenerateColumns="false" AllowPaging="false" Width="75%" borderColor="#93bee2" bgColor="white" border="1">
<Columns>
<asp:BoundField DataField="ID" HeaderText="记录号"/>
<asp:BoundField DataField="CallRecordID" HeaderText="回访记录ID"/>
<asp:TemplateField>
<ItemTemplate>
<a href="BusinessFollowUpInfoEdit.aspx?id="></a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
如代码所示,我想点
问题没说清楚哦?
你把:
<asp:TemplateField>
<ItemTemplate>
<a href="BusinessFollowUpInfoEdit.aspx?id="></a>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="ID"
DataNavigateUrlFormatString="BusinessFollowUpInfoEdit.aspx?id={0}"
HeaderText="详细" Text="详细" />
试试
<asp:TemplateField>
<ItemTemplate>
<a href="BusinessFollowUpInfoEdit.aspx?id=" + <% Eval("ID")></a>
</ItemTemplate>
</asp:TemplateField>
这样就可以了.~
那你绑定的时候就把那个id绑定上不就行了嘛?