如何在asp.net vb.net中选择多个复选框列表 [英] How to select multiple checkboxlists in asp.net vb.net

查看:119
本文介绍了如何在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 .

&lt;asp:CheckBoxList ID=&quot;CheckBoxList1&quot; runat=&quot;server&quot;
DataSourceID=&quot;SqlDataSource1&quot; DataTextField=&quot;SeatName&quot;
DataValueField=&quot;SeatName&quot; RepeatColumns=&quot;12&quot; CellPadding=&quot;5&quot;
CellSpacing=&quot;5&quot;&gt;
&lt;/asp:CheckBoxList&gt;
&lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot;
ConnectionString=&quot;&lt;%$ ConnectionStrings:ConnectionString2 %&gt;&quot;
SelectCommand=&quot;SELECT [SeatName] FROM [Seatnumber1]&quot;&gt;&lt;/asp:SqlDataSource&gt;





我的表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 %&gt;&quot; SelectCommand=&quot;SELECT [SeatName] FROM [Seatnumber1]&quot;&gt;&lt;/asp:SqlDataSource&gt;





我的表Seatnumber1:SeatID(int),用户名(nvarchar),SeatName(nvarchar),预订(位)



my table Seatnumber1 : SeatID(int), Username(nvarchar), SeatName(nvarchar), booked(bit)


这篇关于如何在asp.net vb.net中选择多个复选框列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆