protected void Button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < Convert.ToInt32(TextBox1.Text); i++)
{
FileUpload fu = new FileUpload();
fu.ID = fu + "i";
Panel1.Controls.Add(fu);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
string name;
HttpFileCollection fc = Request.Files;
for (int i = 0; i < fc.Count; i++)
{
HttpPostedFile pf = fc[i];
name = System.IO.Path.GetFileName(pf.FileName);
pf.SaveAs(Server.MapPath("~/up/") + name);
}
}