[英]Passing CheckBoxList parameters to Stored Procedure
I have an asp.net checkboxlist which keeps my numbers 我有一个保留我的号码的asp.net复选框
01
02
03
04
05
.
.
.
And I have a number field in my sql server database table, which can contain the values above. 我的sql server数据库表中有一个数字字段,其中可以包含上面的值。 So when above fields checked in my checkboxlist, I want my stored procedure to filter the table with the checked values.
因此,当在复选框列表中选中以上字段时,我希望我的存储过程使用选中的值来过滤表。
what is the proper way to achieve this? 实现此目标的正确方法是什么?
There is a way by which you can pass the DataTable to store procedure. 您可以通过一种方式将DataTable传递给存储过程。
Here is a link for the same 这是相同的链接
http://www.codeproject.com/Articles/412802/Sending-a-DataTable-to-a-Stored-Procedure http://www.codeproject.com/Articles/412802/Sending-a-DataTable-to-a-Stored-Procedure
How to pass table value parameters to stored procedure from .net code 如何通过.net代码将表值参数传递给存储过程
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.