Click here to Skip to main content
11,492,691 members (52,721 online)
Rate this: bad
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
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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 454
1 Maciej Los 286
2 F-ES Sitecore 224
3 KarstenK 210
4 CPallini 208
0 Sergey Alexandrovich Kryukov 10,062
1 OriginalGriff 8,620
2 Sascha Lefèvre 3,609
3 Maciej Los 3,372
4 Richard Deeming 2,500

Advertise | Privacy | Mobile
Web04 | 2.8.150520.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