Advertisement
mota57

Find the resource project directory

Mar 8th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. string currentDirectory = HttpContext.Current.Server.MapPath("/");
  2. string solutionName = "<example_solution_name>";
  3. string solutionPath = currentDirectory.Substring(0, currentDirectory.IndexOf(solutionName)) + solutionName;
  4. string resourcePath = solutionPath + "\\Resources\\";
  5. return resourcePath;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement