if (Request.Files.Count != 0){
HttpPostedFile MyUpFile = Request.Files["file"];
if (!string.IsNullOrEmpty(MyUpFile.FileName))
{
string fileName=MyUpFile.FileName.Substring(MyUpFile.FileName.LastIndexOf("\\")+1);
filePath = ConfigurationManager.AppSettings["AttPath"] + "/Accessories/";
filePath = filePath + project.ProjectID + "/";
string folder = Function.CreateRandomDirectoryFolder(filePath) + "/";
filePath = filePath + folder;
filePath = filePath + fileName;
MyUpFile.SaveAs(filePath);
url = ConfigurationManager.AppSettings["AttUrl"];
url += "/Accessories/" + project.ProjectID + "/" + folder + fileName;
}
}