问题描述
我正在使用radiobutton list。
Hi,i am using radiobutton list.
<asp:RadioButtonList ID="rdoStatus" runat="server" AutoPostBack="true" repeatdirection="Horizontal "OnSelectedIndexChanged="rdoStatus_SelectedIndexChanged">
for (int i = 0; i <= rdoStatus.Items.Count - 1; i++)
{
if (rdoStatus.Items[i].Selected == true)
{
string keyitem = rdoStatus.Items[i].Text;
int subsubMenuItemId = Convert.ToInt32(rdoStatus.Items[i].Value);
objcomp.AddCompanyAppTools(objcomp.CompId, objStatusSubMenuId, subsubMenuItemId);
}
}
当我说重复方向为水平..对于radiobutton列表中的两个项目如果(rdoStatus.Items [i]。选择== true)设置为true ..我的意思是即使我只选择了一个值,它也会取两个值。??
当我删除这个属性重复方向..它只需要一个实际选择的值..所以??我只是想将radiobutton列表的位置设置为hozizontal方式,那就是
when i say repeat direction to horizontal .. for both the items in radiobutton list if (rdoStatus.Items[i].Selected == true) is set to true.. i mean its taking both the values even if i saelected only one ..??
when i remove this property repeat direction .. it takes only one value which is actually selected ..whay so ?? i just i want to set position of radiobutton list to hozizontal manner ,, thats it
推荐答案
if (rdoStatus.SelectedItem != null)
{
string keyitem = rdoStatus.SelectedItem.Text;
int subsubMenuItemId = Convert.ToInt32(rdoStatus.SelectedItem.Value);
}
如果有帮助请告诉我。
Azee ......
Let me know if it helps.
Azee...
这篇关于如何使用重复方向=“Horiozontal” for循环中的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!