I get web response and use streamreader to obtain the response as a string
my code is
HttpWebResponse response = (HttpWebResponse) request.GetRespons
Well, personally I would use:
string line;
while ((line = reader.ReadLine()) != null)
{
if (line.Contains(...))
{
}
}
Reading the line gives you the data and tells you whether you've reached the end of the stream. I agree with Jeff though - "parsing" HTML by reading it line by line is generally a bad idea. It may be good enough in your specific situation, of course.