我在网页中添加了一个RadioButtonList控件,添加了两个Text值分别是“所有提问”和“我的问题”。代码如下:<asp:RadioButtonList ID="RadioButtonList1" runat="server"AutoPostBack="True"RepeatColumns="2">
       <asp:ListItem Value="1">所有提问</asp:ListItem>
       <asp:ListItem Value="2">我的问题</asp:ListItem>
</asp:RadioButtonList>启用的RadioButtonList为true在aspx.cs页面中添加代码如下:
protected void Page_Load(object sender, EventArgs e)
    {
        string condition = this.RadioButtonList1.Items[this.RadioButtonList1.SelectedIndex].Value;        if (!IsPostBack)
        {
            if (condition = 1)
            {
                QuestionManager qm = new QuestionManager();
                rptNewNews.DataSource = qm.SelectAllQuestion();
                rptNewNews.DataBind();
            }
            else
            {
                QuestionManager qm = new QuestionManager();
                rptNewNews.DataSource = qm.SelectByZjID(int.Parse(Request.QueryString["ZjID"]));
                rptNewNews.DataBind();
            }        }
    }在if (condition = 1)处出错,
错误提示为:无法将int转换为string,
我想知道如何通过RadioButtonList的value值写上面的if语句,实现通过点击RadioButtonList使Repeater控件中显示出不同的类容,