Why is StringValues used for Request.Query values?

后端 未结 4 1492
粉色の甜心
粉色の甜心 2020-12-25 10:08

Let\'s say I have some url that looks like this: www.myhost.com/mypage?color=blue

In Asp.Net Core, I\'d expect to get the color query parameter value by doing the fo

4条回答
  •  醉酒成梦
    2020-12-25 10:23

    Because your query can look like this:

    www.myhost.com/mypage?color=blue&color=red&color=yellow

    And you get all those color values from the one Request.Query["color"] parameter

提交回复
热议问题