How do I extract name-value pairs in C# ASP.NET from a string?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Given the following reponse string:

string test = "value1=5&value2=xyz&value3=text2"

Is there a function to extract the values for each named element?
If not how do I do it

This string comes in as a responce from library function. The name-value pairs are separated with the &

Thank you
 
String.Split( ) is in the C# documentation

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/



Greg R said:
Given the following reponse string:

string test = "value1=5&value2=xyz&value3=text2";

Is there a function to extract the values for each named element?
If not how do I do it?

This string comes in as a responce from library function. The name-value
pairs are separated with the &.
 
Back
Top