string subPath ="ImagesPath"; // Your code goes here bool exists = System.IO.Directory.Exists(Server.MapPath(subPath)); if(!exists) System.IO.Directory.CreateDirectory(Server.MapPath(subPath));