Good way to parse query string
- by m.edmondson
I have a String that contains the following:
?workarea=London+&+Home+Counties+Ltd&sub=fs&&&FASh*5
which resembles a URI query string. What is the best way to parse the elements of this string (workarea and sub) without messing about with string manipulation?
If I use HttpUtility.ParseQueryString is gets stuck as both elements include &. However if I encode the whole thing first I lose the seperations of the elements. Ideally the output would be:
workarea = London & Home Counties Ltd
sub = fs&&&FASh*5