指量上传怎么做啊~~如点击一下添加按钮添加一个input,之后一起添加入数据库,谢谢各位高手~在线等

解决方案 »

  1.   

    <script type="text/javascript">  
    function AddFile()  
    {  
      var strFile=" <input name=\"upload_file\" type='file' class='inputText' style='WIDTH:350px;'/> <br/>";  
      document.getElementById("td_uploadFile").insertAdjacentHTML("beforeEnd",strFile);  
    }  
      </script>  
      <input id="BtnAddFile" type="button" class="inputButton" value="增加附件" onclick="javascript:AddFile()" />  <td id="td_uploadFile" align="center">  
      <input id="upload_file" name="upload_Attachment" type="file" class="inputText"  
      style="width: 350px; display:none;" runat="server" />  
    </td>  
    HttpFileCollection Files = HttpContext.Current.Request.Files;  
      for (int i = 0; i < Files.Count; i++)  
      {    HttpPostedFile PostedFile = Files[i];  
      if (PostedFile.ContentLength > 0)  
      {}  
      }  
    http://topic.csdn.net/u/20091123/09/1983e0e3-6019-4ba3-b39c-73d514fc4196.html
      

  2.   

    遍历页面控件
    foreach (Control c in this.Controls)
      {
      if (c.GetType().ToString() == "System.Web.UI.HtmlControls.HtmlInputText")
       { HtmlInputText txt = c as HtmlInputText;
         if (txt != null)
          {
         }
      }
      

  3.   

    哥们你太NB了,你是不是CSDN的工作人员吧~~~什么都不说了,给分~~