如何在asp.net vb.net中选择多个复选框列表 [英] How to select multiple checkboxlists in asp.net vb.net
问题描述
您好
i想知道如何检查多个复选框列表如下图所示,我从列SeatName加载它们
< a href =http://i69.photobucket.com/albums/i76/tothanhtuan/checkbox_zpsc7ec8884.jpg> http://i69.photobucket.com/albums/i76/tothanhtuan/checkbox_zpsc7ec8884.jpg [< a href =http://i69.photobucket.com/albums/i76/tothanhtuan/checkbox_zpsc7ec8884.jpgtarget =_ blanktitle =New Window> ^ ]
如果用户选中复选框列表,则会禁用这些复选框列表。并且所有值都将保存到数据库中
提前感谢。
Hi There
i would like to know how to check multiple checkboxlists as the image below ,i loaded them from column SeatName
http://i69.photobucket.com/albums/i76/tothanhtuan/checkbox_zpsc7ec8884.jpg[^]
if the user check the checkboxlists then these checkboxlists will be disable . and all values will be save to database
thanks in advance .
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="SeatName"
DataValueField="SeatName" RepeatColumns="12" CellPadding="5"
CellSpacing="5">
</asp:CheckBoxList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"
SelectCommand="SELECT [SeatName] FROM [Seatnumber1]"></asp:SqlDataSource>
我的表Seatnumber1:SeatID(int),用户名(nvarchar),SeatName(nvarchar),预订(位)
my table Seatnumber1 : SeatID(int), Username(nvarchar), SeatName(nvarchar), booked(bit)
推荐答案
ConnectionStrings:ConnectionString2%& gt;& quot;
SelectCommand =& quot; SELECT [SeatName] FROM [Seatnumber1]& quot;& gt;& lt; / asp:SqlDataSource& gt;
ConnectionStrings:ConnectionString2 %>" SelectCommand="SELECT [SeatName] FROM [Seatnumber1]"></asp:SqlDataSource>
我的表Seatnumber1:SeatID(int),用户名(nvarchar),SeatName(nvarchar),预订(位)
my table Seatnumber1 : SeatID(int), Username(nvarchar), SeatName(nvarchar), booked(bit)
这篇关于如何在asp.net vb.net中选择多个复选框列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!