-2

I have a string that returns from a Web API:

example:

 string res = "refno=11111&status=0&deldate=2023-07-16"

how to get the value of refno, status and deldate?

Don2
  • 313
  • 3
  • 12

1 Answers1

1

That's called a "query string". You can use HttpUtility.ParseQueryString to get the pieces, if you don't want to parse the string yourself.

https://learn.microsoft.com/en-us/dotnet/api/system.web.httputility.parsequerystring?view=net-7.0

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30