I am trying to log only 3rd line (or lines 1 to 3 if logging just one line is not possible) from a webResposne.
here is a snippet of the code that I am using for now.
StreamReader read = new StreamReader(myHttpWebResponse.GetResponseStream(), System.Text.Encoding.UTF8);
String result = read.ReadToEnd();
Log("Access", Server.HtmlEncode(result), "Success");
I am getting the following output
<html>
<head>
<title>Access is Granted.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
...
and so on.
I would just like to log "(title>Access is Granted.(/title>" and not print anything else (or anything after that line).
How would I go about doing that?
Thank you