如何使用vb.net绑定checkboxlist [英] how to bind checkboxlist using vb.net
本文介绍了如何使用vb.net绑定checkboxlist的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="mname" DataValueField="monthid"
RepeatDirection="Horizontal">
</asp:CheckBoxList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:myconnection %>"
SelectCommand="select monthid,mname from months where monthid not in(SELECT mnameid
FROM InstallmentItem INNER JOIN Installment
ON InstallmentItem.InstallmentID = Installment.InstallmentID
AND InstallmentItem.SessionID = Installment.SessionID
Where (InstallmentItem.SessionID =@sss) )">
<SelectParameters>
<asp:ControlParameter ControlID="HiddenField1" Name="sss"
PropertyName="Value" />
</SelectParameters>
</asp:SqlDataSource>
这是复选框列表。我想用vb.net绑定
this is the checkboxlist. which i want to bind using vb.net
推荐答案
ConnectionStrings:myconnection %>
< span class =code-attribute> SelectCommand = 从monthid不在的月份中选择monthid,mname (SELECT mnameid
FROM InstallmentItem INNER JOIN Installment
ON InstallmentItem.InstallmentID = Installment.InstallmentID
AND InstallmentItem.SessionID = Installment.SessionID
Where(InstallmentItem.SessionID = @ssss)) >
< ; SelectParameters >
< asp:ControlParameter ControlID = HiddenField1 名称 = sss
PropertyName = 值 / >
< / SelectParameters >
< / asp:SqlDataSource >
ConnectionStrings:myconnection %>" SelectCommand="select monthid,mname from months where monthid not in(SELECT mnameid FROM InstallmentItem INNER JOIN Installment ON InstallmentItem.InstallmentID = Installment.InstallmentID AND InstallmentItem.SessionID = Installment.SessionID Where (InstallmentItem.SessionID =@sss) )"> <SelectParameters> <asp:ControlParameter ControlID="HiddenField1" Name="sss" PropertyName="Value" /> </SelectParameters> </asp:SqlDataSource>
这是复选框列表。我想用vb.net绑定
this is the checkboxlist. which i want to bind using vb.net
请看下面的链接:
从ASP.Net中的数据库绑定CheckBoxList [ ^ ]
Please have a look on the bellow link :
Bind CheckBoxList from Database in ASP.Net[^]
这篇关于如何使用vb.net绑定checkboxlist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文