c# - HttpUtility.ParseQueryString value and Key -
i'm trying remove key , value of httputility.parsequerystring , not able key , value. (ex: //somesite.com/someaction?article=1&lang=en )
i want :
[ {"article",1}, {"lang","en"} ];
any idea how there ?
you can keys , values:
string[] allkeys = request.querystring.allkeys .select(k => "key: " + k + " value: " + request.querystring[k]) .toarray();
modify select
method data structure want (other string[]
), example:
string[][] allkeys = request.querystring.allkeys .select(k => new string[] { k, request.querystring[k]}) .toarray();
Comments
Post a Comment