所选的RadioButtonList在后面的代码中不正确 [英] The selected RadioButtonList is not correct in code behind
本文介绍了所选的RadioButtonList在后面的代码中不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用带有两个列表项的单选按钮列表.我将!IsPostBack事件下的page_load上的单选按钮列表与默认值绑定在一起.问题是.即使我更改那里的值以单击按钮将其保存在数据库中获取默认选择的项目而不是更改的项目.请帮助我!
I m using a radiobuttonlist with two listitem.I am binding the radiobuttonlist on page_load under !IsPostBack event with there default values.On the problem is..even if i change there values to save it in the database on click of a button i am getting the default selected item and not the changed item.Please help me!!
推荐答案
您好,
可能有几个原因.可能您从单选按钮列表中选择值的方式是错误的.它应该类似于radionbuttonlistid.selectedvalue.如果您可以共享代码,那就更好了.您如何绑定列表.它是动态的还是硬编码的.
快乐编码
:)
Hi,
There can be several reasons for this. May the way you are picking the value from the radio button list is wrong. It should be like the radionbuttonlistid.selectedvalue . It will be better, if you can share the code. How you are binding the list. Is it dynamically or hardcoded.
Happpy Coding
:)
radiobuttonlist.SelectedItem.Text;
Try this ? ?
这篇关于所选的RadioButtonList在后面的代码中不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文