Any way to get a file system path for a razor page?

459 Views Asked by At

For a page 'TestModel' in 'Pages/TestPages/' get a string like: /linux or project root/project-name/Pages/TestPages/

Edit: I'm not looking to get a path from inside a running page. Let's say from startup.cs

Edit 2: I'm looking something like this:
string GetPath(PageModel Page)
string path = GetPath(TestModel)
path: "/linux or project root/project-name/Pages/TestPages/"

0

There are 0 best solutions below