为什么在DataList 中加入例如CheckBox 不能数据绑定呢
<asp:DataList id= "DataList1 " runat= "server " RepeatColumns= "6 ">
<ItemTemplate>
<asp:CheckBox id= "CheckBox1 " runat= "server "> <%# DataBinder.Eval(Container.DataItem, "setname ")%> </asp:CheckBox>
</ItemTemplate>
</asp:DataList>
------解决方案-------------------- <EditItemTemplate>
<asp:TextBox id=TextBox1 runat= "server " Text= ' <%# DataBinder.Eval(Container, "DataItem.id ") %> '>
</asp:TextBox>
</EditItemTemplate>
------解决方案--------------------setname 是什么类型的啊?
------解决方案-------------------- <EditItemTemplate>
<asp:TextBox id=TextBox1 runat= "server " Text= ' <%# DataBinder.Eval(Container, "DataItem.setname ") %> '>
</asp:TextBox>
</EditItemTemplate>
------解决方案-------------------- <ItemTemplate>
<img src = '../uploads/smallimg/ <%# DataBinder.Eval(Container.DataItem, "photo_name ") %> '> <br>
<%# DataBinder.Eval(Container.DataItem, "photo_name ") %>
<br>
<asp:CheckBox Runat= "server " ID= "ckdel " AutoPostBack= "False "> </asp:CheckBox>
</ItemTemplate>
------解决方案-------------------- <asp:TextBox id=TextBox1 runat= "server " Text= ' <%# DataBinder.Eval(Container, "DataItem.setname ") %> '>