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

前端 未结 5 2052
傲寒
傲寒 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:41

    Well, Request.QueryString already IS a collection. Specifically, it's a NameValueCollection. If your code is running in ASP.NET, that's all you need.

    So to answer your question: Yes, there is.

提交回复
热议问题