In my asp.net c # solution, I want to get a dictionary of all the URL parameters, where the key is the parameter name and The value is the parameter value. How can I do this?
Thank you.
You HttpUtility.ParseQueryString You can use it to get the queryring value yourself: Together it More information at The hard manual method is without using the Biltine method: Numeral Collection qscollection = HttpUtility.ParseQueryString (Querystring);
Request.Url.Query
Numerology qscollection = HttpUtility.ParseQueryString (Request.Url.Query);
name value collection query parameters = new Name Value Acquisition (); String [] querySegments = queryString.Split ('& amp;'); Foreach (string segment in query segment) {string [] parts = segment .plit ('='); If (parts.Length & gt; 0) {string key = parts [0]. Trimurum (new four [] {'?', ''}); String val = parts [1]. Trim (); QueryParameters.Add (key, val); }}
No comments:
Post a Comment