I am very new to C#and I am trying to contact a server and received data from the server. I can successfully receive the data, but I don't know how to access the object's properties. What I want is to display only the SessionID e.g. "biRvqpChQZf7Cujy5CuW0PjU1R7gIp"
WebRequest LoginRequest = WebRequest.Create("xxx");
LoginRequest.Method = "GET";
WebResponse LoginResponse = LoginRequest.GetResponse();
Stream LoginResponseStream = LoginResponse.GetResponseStream();
StreamReader reader = new StreamReader(LoginResponseStream);
string responseFromServer = reader.ReadToEnd();
string TheText = new JavaScriptSerializer().Serialize(responseFromServer);
Label1.Text = TheText;
As is the outcome of TheText now is:
"{\"utLogon_response\":{\"SessionID\":\"rP99mnHAFwI840xVJMDOJpcgmE2l6z\"}}"
Here is the object "manually" from HTML: