Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Razor ASP.NET Core如何在没有查询字符串的情况下使用[ASP page]标记帮助器?_Razor_Asp.net Core_Asp.net Core Mvc - Fatal编程技术网

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&param=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&param=another-query-parameter
当我使用锚定标记辅助对象时,如:

<a asp-page="anotherpage">Go to another page</a>
但我想要的只是:

http://localhost/anotherpage
我发现我可以使用
,但我认为这不是一个好方法

http://localhost/anotherpage