Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WebBrowserControl
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 11-Feb-13 23:47pm
Edited 11-Feb-13 23:49pm
v2
Comments
Logi Guna at 12-Feb-13 10:24am
   
foreach (HtmlElement element in webBrowser1.Document.Images)
{
MessageBox.Show("Image found at location " + element.OffsetRectangle.Location.ToString());
}
Member 8367060 at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100