retive img src link

Jan 6, 2012 at 3:32 PM

 have this code to get the img src link but it just finds for http and not for imgsrc tag and then copy the link so i need to frist find imgsrc within that class and the the http link, how can i get..

  string pageUrl = "http://rr.sapo.pt/";

               HAP.HtmlWeb hDoc = new HAP.HtmlWeb();
                var doc = hDoc.Load(pageUrl);


                var divNode = doc.DocumentNode.SelectSingleNode("//div[@class='pics']");
                string src1 = divNode.InnerHtml;

                int startIndex = src1.IndexOf("http");
                int endIndex = src1.IndexOf("png")+3;
                string strSrc = src1.Substring(startIndex, (src1.Length - startIndex) - (src1.Length - endIndex));

so i need to find img src and then the httplink

now is returning http://rr.sapo.pt/bolabranca.aspx'><img src='http://mediaserver.rr.pt/newrr/bola-branca121339c8.pngand i need the httplink after img src