C# 获取checkbox选中值

解决方案 »

  1.   

     获取checkbox选中值 
    <asp:Repeater ID="Repeater_admin" runat="server">
       <ItemTemplate>
       <tr bgcolor="#FFFFFF">
        <td height="25" nowrap bgcolor="#F4FBFF"><asp:CheckBox ID="ID_list" runat="server" /></td>
        <td nowrap bgcolor="#F4FBFF"><a href='MediaDetail.aspx?Entry=<%#tMedia("Entry") %>'> <%#tMedia("NTitle") %></a> </td>
        <td  bgcolor="#F4FBFF" title='<%#tMedia("LearningResourceType") %>'> <%#tMedia("LearningResourceType") %>  </td>
        </tr>
       </ItemTemplate>
      </asp:Repeater>        
      

  2.   

    循环判断
    if(checkBox.Checked)

        // 选中的选项
    }
      

  3.   

    if (Checkbox1.Checked == true)
    {
       string str = Checkbox1.Text;
    }