62,046
社区成员
发帖
与我相关
我的任务
分享
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeaterlist_ItemCommand">
<ItemTemplate>
<table width="100%" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td width="10%" align="center"><input id="isrecommend" runat="server" type="text" value='<%#DataBinder.Eval(Container,"DataItem.IsRecommend") %>' style="width:70px;"/></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
for (int i = 0; i < Repeater1.Items.Count; i++)
{
ProductsClass productsclass = new ProductsClass();
HtmlInputText isrecommend = (HtmlInputText)Repeater1.Items[i].FindControl("isrecommend");
productsclass.IsRecommend = int.Parse(isrecommend.Value.ToString());
}