<script type = "text/javascript"> var counter = 0; function AddFileUpload() { counter++; var div = document.createElement('DIV'); div.innerHTML = '<input id="file' + counter + '" name = "file' + counter + '" type="file" /> Name Of Certificate : <input id="TextBox' + counter + '" name="TextBox' + counter + '" type="text" /> Year Obtained : <input id="TextBox2' + counter + '" name="TextBox2' + counter + '" type="text" /> <input id="Button' + counter + '" type="button" value="Remove" önclick = "RemoveFileUpload(this)" />'; document.getElementById("FileUploadContainer").appendChild(div); } function RemoveFileUpload(div) { document.getElementById("FileUploadContainer").removeChild(div.parentNode); } </script>
protected void PersonalButtonNext3_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); BSEnterpriseLib dal = new BSEnterpriseLib(); string msg = ""; for (int i = 0; i < Request.Files.Count; i++) { HttpPostedFile PostedFile = Request.Files[i]; if (PostedFile.ContentLength > 0) { string FileName = System.IO.Path.GetFileName(PostedFile.FileName); //here I need to get the ID of the text boxes and get the data inputed into them and then use //this data to input into the database, while iterating //insert into the database here PostedFile.SaveAs(Server.MapPath("Uploaded Documents\\") + FileName); } } messagelabel.text = "Successful"; }
aspx
false
style="display:none;"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)