string root = Server.MapPath("~"); string path = root+"\\Brands\\"; string brandname = addbrand.Text; bool isExists = System.IO.Directory.Exists(Server.MapPath(@"~/"+path+"/"+brandname)); if (!isExists) System.IO.Directory.CreateDirectory(Server.MapPath(@"~/" + path + "/" + brandname)); if (uploadimg.HasFile) { string FileName = Path.GetFileName(uploadimg.PostedFile.FileName); uploadimg.SaveAs(@root+"/Images/" + FileName); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)