为什么不用<asp:RadioButtonList??
如果这样你要写n个事件
protected  rbType_Click(object sender,...)
{
 id = "1";
}
protected  rbJianDu_Click(object sender,...)
{
 id = "2";
}
//id是个页面级变量.

解决方案 »

  1.   

    <asp:RadioButtonList>用这个该如何写?
      

  2.   

    if(rbType.Checked==true)
    {
        ID=1;
    }
    else if(rbJianDu.Checked==true)
    {
        ID=2;
    }
    ......
      

  3.   

    <asp:RadioButtonList ID="RadioButtonList1" runat="server" onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="True">
        <asp:ListItem Value ="1">监督</asp:ListItem>
        <asp:ListItem Value ="2">投诉</asp:ListItem>
        <asp:ListItem Value ="3">咨询</asp:ListItem>
        <asp:ListItem Value ="4">曝光</asp:ListItem>
        <asp:ListItem Value ="5">建议</asp:ListItem>
        <asp:ListItem Value ="6">感谢</asp:ListItem>
    </asp:RadioButtonList>protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        ID = RaidoButtonList1.SelectedValue;
    }