How to get query string variables in MVC 4's Request?

后端 未结 2 579
耶瑟儿~
耶瑟儿~ 2021-02-14 15:08

I\'m guffawed here working on my first MVC 4 project with the Web Api variety.

In MVC 3 I could get a query string parameter like such:

var unicornName          


        
2条回答
  •  长情又很酷
    2021-02-14 15:38

    I think this may be what you are looking for,

      var queryValues = Request.RequestUri.ParseQueryString();
    

    https://stackoverflow.com/a/11729619/6819

提交回复
热议问题