Questions tagged «checkboxlist»

11
如何在ASP.NET C#中使用foreach获取CheckBoxList中选定项的值?
我有一个这样的CheckBoxList: <asp:CheckBoxList ID="CBLGold" runat="server" CssClass="cbl"> <asp:ListItem Value="TGJU"> TG </asp:ListItem> <asp:ListItem Value="GOLDOZ"> Gold </asp:ListItem> <asp:ListItem Value="SILVEROZ"> Silver </asp:ListItem> <asp:ListItem Value="NERKH"> NE </asp:ListItem> <asp:ListItem Value="TALA"> Tala </asp:ListItem> <asp:ListItem Value="YARAN"> Sekeh </asp:ListItem> </asp:CheckBoxList> 现在,我想使用foreach从此CheckBoxList中获取所选项目的值,并将其放入列表中。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.