解决方案 »

  1.   

    <input type=radio name="xb1" value="0"  id="radio1" />请假<input type=radio name="xb1" id="radio2" value="1"  />旷课用一个隐藏的文本框 或者 lable 服务器控件 记录点击某个同学 是 请假 还是旷课 再在后台进行读取   这是我用的方法
      

  2.   

    <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                <input type="radio" name="xb1<%#Container.ItemIndex %>" value="0" onclick="rad('<%#Eval("id") %>',0)" />请假<input
                    type="radio" name="xb1<%#Container.ItemIndex %>" value="1" onclick="rad('<%#Eval("id") %>',1)" />旷课
            </ItemTemplate>
        </asp:Repeater>
        <div style="display: none;">
            <asp:Label ID="Label1" runat="server" Text="Label">
                在这个地方存放 学员A 请假或旷课;学员B 请假或旷课 
            </asp:Label>
        </div>
    js  rad('<%#Eval("id") %>',1) 方法 和 后台自己写  
      

  3.   

    Refer here:
    http://www.cnblogs.com/insus/p/3199341.html
      

  4.   

    foreach (GridViewRow row in this.GridView1.Rows)
    {
                RadioButton rb1 = (RadioButton)row.FindControl("RadioButton1");
           RadioButton rb2 = (RadioButton)row.FindControl("RadioButton2");
    int type=0;
      if (rb1.Checked)
    {
    type=0;
    }
    if (rb2.Checked)
    {
    type=1;
    }
    //然后在拆入到数据库中。
    }
      

  5.   

    Quote: 引用 5 楼 kongwei521 的回复:

    [code=csharp]foreach (GridViewRow row in this.GridView1.Rows)
    {
                RadioButton rb1 = (RadioButton)row.FindControl("RadioButton1");
           RadioButton rb2 = (RadioButton)row.FindControl("RadioButton2");
    int type=0;
      if (rb1.Checked)
    {
    type=0;
    }
    if (rb2.Checked)
    {
    type=1;
    }
    //然后在拆入到数据库中。
    }