中继器和ListBOX [英] Repeater and ListBOX

查看:104
本文介绍了中继器和ListBOX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

列表框 [ 我将列表框与存储过程绑定在一起
并且列表框具有以下内容....
Listbox.datatextfield = ProductName;
Listbox.dataValuefield = ProductID;

当我在列表框中选择多个项目时,它将valuefield转换为
名为GetProductdetailsbyid(ProductID)的存储过程

它将获得ProductName,ProductID,ProductRate,ProductUnit.

我必须将其存储到数据表中并绑定到转发器控件中..

任何人都可以尝试并给出解决方案吗?

您可以尝试其他控件,例如datalist,gridview ...

感谢YOu

LISTBOX[]

I have a listbox named Products and its attribute SelectionMode="Multiple"
i binded listbox with stored procedure
and listbox has the following....
Listbox.datatextfield=ProductName;
Listbox.dataValuefield=ProductID;

when i selected multiple items in the Listbox it will valuefield to a
stored procedure named GetProductdetailsbyid(ProductID)

it will get ProductName,ProductID,ProductRate,ProductUnit.

I have to store that to datatable and bind in an repeater Control..

Can Any One Try this and give a solution?

You can try other controls like datalist,gridview...

Thank YOu

推荐答案

尝试以下步骤:
1.您需要更改SP"GetProductdetailsbyid(ProductID)",因为列表框是多选的,因此您应该能够将多个产品ID传递到SP.
2.从SP的数据表中检索记录集,并将其绑定到转发器控件.此
链接将帮助您开始使用.
Try below steps:
1. You need to change you SP "GetProductdetailsbyid(ProductID)", since the listbox is multiselect and hence you should be able to pass multiple product id''s to your SP.
2. Retrieve the recordset from your SP in datatable and bind it to the repeater control. This link will help you to start with.


这篇关于中继器和ListBOX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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