Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am not able to retrieve the location of a tag in web browser control C#....I guess its because of some image objects in the browser content....Is there a way to get the offset positions of an HTML tag in webpage containing image objects?
Posted
Updated 11-Feb-13 22:49pm
v2
Comments
Logi Guna 12-Feb-13 10:24am    
foreach (HtmlElement element in webBrowser1.Document.Images)
{
MessageBox.Show("Image found at location " + element.OffsetRectangle.Location.ToString());
}
Member 8367060 12-Feb-13 23:36pm    
I need to get the offset position of <span> tag...I am using
HtmlElementCollection sp = textwebBrowser1.Document.GetElementsByTagName("span");
to get a collection of span tags....but in some cases even if i have span tags in the page,the count of the collection is zero...I guess it is because of some object tags with image information in between...I don't know how to retrieve the offset of span tag in this case

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900