I am looking to do something like this to assign a unique ID to each checkbox in a gridview:
But I get the error message 'server tag is not well-former'. Is it possible to do it like this? If not, what would be a good way to assign a unique ID to a checkbox control in an item template?
Code:
<asp:TemplateField Visible="False" HeaderStyle-CssClass="SpreadSheetHeader" ItemStyle-CssClass="SpreadSheetCell" ShowHeader="True" HeaderText="Add to Cart / Qty" > <ItemTemplate> Add?<asp:CheckBox ID='<%# Eval("DFNumber") %>' CssClass="chkOrder" runat="Server" /> Qty:<asp:TextBox CssClass="txtBoxQuantity" ID="txtQuantity" runat="server"></asp:TextBox> </ItemTemplate> </asp:TemplateField>
Comment