hi,
this is multiple files using file upload control :
for (int i = 0; i <= hfc.Count - 1; i++)
{
HttpPostedFile hpf = hfc[i];
if (hpf.ContentLength > 0 && hpf.ContentLength <= 2097152)
{
hpf.SaveAs(Server.MapPath(@"subdomains\\" + Session["webaddress"].ToString() + "\\images") + "\\" + System.IO.Path.GetFileName(hpf.FileName));
//hpf.SaveAs(Server.MapPath("upload") + "\\" + System.IO.Path.GetFileName(hpf.FileName));
list.InnerHtml += "<b>File: </b>" + hpf.FileName + " <b>Size:</b> " + hpf.ContentLength + " <b>Type:</b> " + hpf.ContentType + " Uploaded Successfully <br/>";
gallery += "<a href='upload/" + hpf.FileName + "' title='' class='thickbox' rel='gallery-plants'><img src='upload/" + hpf.FileName + "' alt='Plant 1' width='100px' height='100px'></a> ";
}
else
{
Response.Write("<script>alert('Size is limited to 2MB')</script>");
}
}
thanks,
appalanaidu
Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator