-2

I send data to the API via HttpRequestHeader (post)
The server response is:

code1=7ea12f&code2=3867&code3=123&code4=104

I need to string each value to view them in separate label.

label1.text = code1;
label2.text = code2;
label3.text = code3;
label4.text = code4;
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
amid
  • 23
  • 6

1 Answers1

-1

You can do this:

var nameValueCollection = System.Web.HttpUtility.ParseQueryString("code1=7ea12f&code2=3867&code3=123&code4=104");

label1.text = nameValueCollection["code1"];
label2.text = nameValueCollection["code2"];
label3.text = nameValueCollection["code3"];
label4.text = nameValueCollection["code4"];
Chris
  • 2,009
  • 1
  • 16
  • 25