GridView通过Container在前台页面访问并找到绑定模版中控件
<asp:GridView ID="GVStat" runat="server" AutoGenerateColumns="False" Width="90%" AllowPaging="false">
<Columns>
<asp:TemplateField HeaderText="col2">
<ItemTemplate>
<asp:TextBox ID="txt2" MaxLength="3" Width="30" runat="server" Text='<%# Eval("col2") %>'></asp:TextBox>
<%# ((Container as GridViewRow).FindControl("txt2") as TextBox).ClientID %>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>