<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="MaintImplementSystem.test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>测试</title>
<script language="javascript" type="text/javascript">
    function addFile() {
        var checkbox1 = '<br><input type="checkbox"  name="Checkbox"  class="ButtonCss" />.doc';
        document.getElementById('FileList').insertAdjacentHTML("beforeEnd", checkbox1);
    }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <input type="button" value="增加Checkbox"  onclick="addFile()" id="Button2"   class="button" />
    <br />
    <p id="FileList        <input id="Checkbox1" type="checkbox"  name ="Checkbox" runat="server"/>
        </p>
        <br />
    <asp:Button ID="Button1" runat="server" Text="确定" onclick="Button1_Click" />
    </form>
</body>
</html>

解决方案 »

  1.   

    加个ruant="server".
    post request
      

  2.   

    给checkbox设置一组有规律的name值...比如cb01,cb02、cb03确保其他控件不是cb开头的...后台Request.Form.AllKeys里面去判断每个key的开头是否是cb然后
                Request.Form.Get(key);
    方法笨了点..呵呵..
      

  3.   

    你给他帮定个NAME 或ID 。后台获取就可以了。
      

  4.   

    ajax +  一般处理程序
      

  5.   

        <script type="text/javascript">
            var fileIndex = 2;
            var controlId = "file";
            $(function() {
                $("#btnAddNew").bind("click", function() { 
                    $("#Container").append("<input type='file' name='"+controlId+fileIndex+"' />");
                    fileIndex++;
                });
            });
        </script>
    改成你想要的checkbox