retive img src link

Jan 6, 2012 at 2: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 = "";

               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'><img src=' i need the httplink after img src