对于“Pages/TestPages/”中的页面“TestModel”,获取如下字符串:/linux 或项目根目录/项目名称/Pages/TestPages/
编辑:我不想从正在运行的页面中获取路径。假设从 startup.cs
编辑 2: 我看起来像这样:
string GetPath(PageModel Page)
string path = GetPath(TestModel)
path: "/linux or project root/project-name/Pages/TestPages/"