hi,
this my my file uploading code
-------------------------------
protected void Upload_MainImage(object sender, EventArgs e)
{
if (BrandUploadImg.HasFile)
{
BrandUploadImg.SaveAs(MapPath("/PRODIMAGES/" + BrandUploadImg.FileName));
System.Drawing.Image img1 = System.Drawing.Image.FromFile(MapPath("/PRODIMAGES/") + BrandUploadImg.FileName);
NormalImage.ImageUrl = "/PRODIMAGES/" + BrandUploadImg.FileName;
}
UpdatePanel7.Update();
}
This for inserting imagefile into database
=============================================
if (NormalImage.ImageUrl != "")
{
string imagename = Path.GetFileName(BrandUploadImg.FileName);
string filename = Path.GetFileName(BrandUploadImg.FileName);
string srvpat = Server.MapPath("/PRODIMAGES/") + filename;
if (!File.Exists(Server.MapPath("/PRODIMAGES/") + filename))
BrandUploadImg.SaveAs(Server.MapPath("/PRODIMAGES/") + filename);
string uploadfilename = NormalImage.ImageUrl;
--------------------------------------------------------------
But it shows the errors like
1.Could not find a file path like D:\folder\...
2.The process cannot access the file 'D:\..... because it is being used by another process.
how to solve these problems,anybody help me please.
Thanks in advance