Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse a string of name value pairs separated by '&'

Status
Not open for further replies.

mateobus

Programmer
Aug 20, 2007
28
US
I have a query string like "name=matt&email=blah@blah.com&color=red" How could I parse this into some sort of list or array accessible by the name attribute?
 
Do a Split() on "&" then loop over the resulting array, and at each item Split() again on "=" and add to a Dictionary?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top