David C
asked on
Request.QueryString (sort of)
Hi Experts,
Is there a way to get the value of a variable given a label with text "rd=5&key=stock&c0=False" to use the same functionality as Request.QueryString("rd") but using the label instead?
Thanks
Is there a way to get the value of a variable given a label with text "rd=5&key=stock&c0=False" to use the same functionality as Request.QueryString("rd") but using the label instead?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
In ForEach loop you get all the values.
In ForEach loop you get all the values.
string data = "a=Tom&b=Casey&rd=5&key=stock&c0=False&c1=False";
string Key;
string value;
foreach (string val in data.Split('&'))
{
string[] values = val.Split('=');
if (values[0] != null)
Key = values[0];
if (values[1] != null)
value = values[1];
}
ASKER
Excellent!
ASKER