Click here to Skip to main content
Rate this: bad
good
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
Edited 11-Feb-13 22: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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 432
1 sanket saxena 355
2 Abhinav S 258
3 OriginalGriff 235
4 CPallini 205
0 Sergey Alexandrovich Kryukov 8,704
1 OriginalGriff 5,000
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


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