Razor ASP.NET Core如何在没有查询字符串的情况下使用[ASP page]标记帮助器?
我知道Razor ASP.NET Core如何在没有查询字符串的情况下使用[ASP page]标记帮助器?,razor,asp.net-core,asp.net-core-mvc,Razor,Asp.net Core,Asp.net Core Mvc,我知道asp-route-{key}是向asp-action,asp-page等添加参数 但是如果我在已经包含查询字符串的页面中使用asp页面,例如: http://localhost/page?query=some-query-parameter¶m=another-query-parameter 当我使用锚定标记辅助对象时,如: <a asp-page="anotherpage">Go to another page</a> 但我想要的只是: ht
asp-route-{key}
是向asp-action
,asp-page
等添加参数
但是如果我在已经包含查询字符串的页面中使用asp页面
,例如:
http://localhost/page?query=some-query-parameter¶m=another-query-parameter
当我使用锚定标记辅助对象时,如:
<a asp-page="anotherpage">Go to another page</a>
但我想要的只是:
http://localhost/anotherpage
我发现我可以使用
,但我认为这不是一个好方法
http://localhost/anotherpage