Is there a way to get all the querystring name/value pairs into a collection?

前端 未结 5 2039
傲寒
傲寒 2020-12-01 10:02

Is there a way to get all the querystring name/value pairs into a collection?

I\'m looking for a built in way in .net, if not I can just split on the & and load

5条回答
  •  离开以前
    2020-12-01 10:38

    QueryString property in HttpRequest class is actually NameValueCollection class. All you need to do is

    NameValueCollection col = Request.QueryString;

提交回复
热议问题