Click here to Skip to main content
12,956,234 members (59,452 online)
Rate this:
Please Sign up or sign in to vote.
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 22:47pm
Updated 11-Feb-13 22:49pm
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,869
CHill60 3,550
Maciej Los 3,243
ppolymorphe 2,070
Jochen Arndt 1,973

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2017
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