为什么asp-route编码获取字符串参数?

Why asp-route encodes get string parameter?

提问人:Yola 提问时间:10/21/2023 更新时间:10/21/2023 访问量:10

问:

我尝试了两种方法来创建链接:

  1. <a asp-page="/page" asp-route-param="[1]">
  2. <a href="/page?param=[1]">

并得到了两个不同的地址:

  1. ../page?param=%5B1%5D
  2. ../page?param=[1]

为什么asp-route编码得到字符串参数,为什么href没有?

asp.net 查询字符串 定位点 urlencode

评论


答: 暂无答案