在列表框中找不到选定的项目 [英] Unable to find the selected item in the ListBox
问题描述
我正在与asp.net合作.我创建了一个Webform并放置了两个控件1)ListBox和2)RadioButtonList
第一个用户可以从列表框中选择该项目,然后单击"RadioButtonList"中显示的其中一个项目.
问题:
--------
我想知道在列表框中选择了哪个项目.
我想在RadioButtonList1_SelectedIndexChanged事件中使用它.如何获取列表框中所选项目的值.
请提供解决方案
谢谢
Rajj
Hi i''m working with asp.net. I have created a webform and i placed two controls 1)ListBox and 2)RadioButtonList
First user can select the item from the ListBox and then user will cllick on one of the items presented in RadioButtonList.
Question:
--------
I want to know which item selected in the ListBox.
I want to use it in the RadioButtonList1_SelectedIndexChanged event. How can i get the value of selected item in the ListBox.
Please provide solution
Thanks
Rajj
推荐答案
使用 ^ ]属性.
使用此
use this
ListBox1.SelectedItem.Text
将从列表中返回选定的项目
will return the selected item from the list
请参阅 ^ ].
这篇关于在列表框中找不到选定的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!