日期:2014-05-19  浏览次数:20613 次

读取状态?
aspx代码页:
<asp:radiobuttonlist   id= "RadioButtonList1 "   runat= "server "   RepeatDirection= "Horizontal ">
<asp:ListItem   Value= "1 "> 是 </asp:ListItem>
<asp:ListItem   Value= "0 "> 否 </asp:ListItem>
</asp:radiobuttonlist>
在aspx.cs里头如何根据等于1的情况就选择“是”,0的情况就选择“否”呢?

if(ds.Tables[0].Rows[0][ "IsVisable "].ToString()== "1 ")
{
    ??
}
else
{
    ??
}

请指教!谢谢!

------解决方案--------------------
if(ds.Tables[0].Rows[0][ "IsVisable "].ToString()== "1 ")
{
RadioButtonList1.SelectedValue = "1 ";
}
else
{
RadioButtonList1.SelectedValue = "0 ";
}