Hi all,
I am trying to carry out the images from a offline webpage loaded in the webbrowser control.
Following is the code.
My problem is that the statementCode:WebBrowser wb = new WebBrowser(); wb.Navigate("Path of the offline web page [ImageTest.htm]"); HtmlElementCollection hec = wb.Document.Images; foreach (HtmlElement he in hec) { string xstr = he.GetAttribute("src"); // Processing related to image ............... ............... }
returns zero images or no ElementCollection in the HtmlElementCollection.Code:HtmlElementCollection hec = wb.Document.Images
so i am not getting any image, though my offline document is having images.
Now interesting thing is that when i simplify the webpage by editing it, i can get the image in the collection.
Both the Normal and modified page are in the attachment.
ImageTest.htm is the original page.
ImageTest1.htm is the modified page.
Thanx for any kind of help.
Regards,
Shail2k4




Reply With Quote