Question Problem accessing link by using HttpWebRequest or WebBrowser

Apr 22, 2012
Programming Experience

I have problem accessing links from a website. The site is Free TV Shows - A online, watch TV Shows - A online, watch TV Shows - A free on and a link that I need to access looks like this in html code : <a href="/tv-shows/Absolute-Power_25833/" class="list cfix"> <span class="c1">Absolute Power</span> <span class="c2">2003</span> </a> .

I try to access this link by forming the complete address :, but when using either the HttpWebRequest class or the WebBrowser class, the page that is opened is the main page of the site, and not the one I give as a link.

Here is the code I use for HttpWebRequest :
//request to access the link
HttpWebRequest webReq = (HttpWebRequest)HttpWebRequest.Create(new Uri(link));

//the response
HttpWebResponse webRes = (HttpWebResponse)webReq.GetResponse();

//gets the stream of data from the response
Stream streamResponse = webRes.GetResponseStream();
StreamReader sr = new StreamReader(streamResponse);

content = sr.ReadToEnd();

And for the webBrowser:

Can someone offer instructions on how to access the intended link ?

Thank you.
Top Bottom