Solved: how to MapPath to a parent directory through server.mappath in asp.net c# | Web Hosting | Domain Registration | Wordpress Hosting | SSL Certificates

Solved: how to MapPath to a parent directory through server.mappath in asp.net c#

try with this code
             Path.Combine(Directory.GetParent(Server.MapPath("")).FullName, "screenshots")
             With Server.MapPath you get your root folder, then with Directory.GetParent you get the root folder parent and finally you combine that with the "screenshot" folder using Path.Combine.
              I hope it helps.
Regards,
SHARE