日期:2014-05-17  浏览次数:20403 次

RadioButtonList 默认绑定

如何修改
控件

------解决方案--------------------
InfoSex.SelectedValue=InfoUpdate.Sex;
------解决方案--------------------
    <asp:RadioButtonList ID="RadioButtonList1" runat="server">
        <asp:ListItem Value="0">男</asp:ListItem>
        <asp:ListItem Value="1">女</asp:ListItem>
    </asp:RadioButtonList>

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string str="女";
                RadioButtonList1.Text = (str == "男" ? "0" : "1");
            }
        }