作者hdd525 (叉面)
看板Visual_Basic
标题[.NET] 请问多个RadioButtonList的值,要如何存入一个阵列之中
时间Sun Aug 3 19:55:17 2008
网站专案:
请问如果我在网页上放置多个RadioButtonList,
然後我打算将之个别的Value放入同一个阵列当中,
就像这样↓
protected void Button1_Click(object sender, EventArgs e)
{
string[] str=new string[5];
if (RadioButtonList1.SelectedIndex > -1)
{
str[0] = RadioButtonList1.SelectedItem.Value;
}
if (RadioButtonList2.SelectedIndex > -1)
{
str[1] = RadioButtonList2.SelectedItem.Value;
}
}
请问有办法用回圈把RadioButtonList1跟RadioButtonList的Value放入阵列吗?
还是只能像我这样用手工来做呢,
谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.245.169