not able to save in shared folder

Mar 2, 2011 at 9:17 AM

Hi

         When i try to upload image in a shared folder , the image gets saved in the project folder itself. How to save the image in the shared fodler,is there any property for this.

below i have given the code which i have used:

HttpPostedFileAJAX

pf = FileUploaderAJAX1.PostedFile;

 

if (pf.Type == HttpPostedFileAJAX.fileType.image )

{

 

//string UploadPath = System.Configuration.ConfigurationManager.AppSettings["UploadImagePath"].ToString();

 

string uploadPath = @"\srv\Images\";

 

string imageProfilePath = string.Format("{0}\\{1}\\{2}\\{3}\\", "admintempimages", "user", "Profile", "Normal");

 

string imageName = string.Format("{0}_{1}.{2}", "temp", DateTime.Now.ToString("ddMMyy_hhmmss"), "png");

 

string imageFolderPath = string.Concat(uploadPath, imageProfilePath);

 

 

FileUploaderAJAX1.SaveAs(imageFolderPath, imageName);

{

 

//string userImagePath = "Users\\\\" + Session["YouDressId"].ToString() + "\\\\Profiles\\\\Normal\\\\" + Session["YouDressId"].ToString() + ".jpg";

 

imgNormal.ImageUrl = imageFolderPath, imageName;

 

 

if (File.Exists(imageFolderPath + pf.FileName))

 

}

 

}