Donate

Loop Through HTML Elements Using GeckoFX WebBrowser

Hello,
Below are snippets on how to loop through HTML Elements Using GeckoFX WebBrowser both in C# and VB.NET. C#:
1
2
3
4
5
//Note: this.DomDocument is a class which inherits the GeckoWebBrowser control
foreach (GeckoElement element in this.DomDocument.GetElementsByTagName("span"))
{
   //some codes here
}

VB.NET:
1
2
3
4
'Note: this.DomDocument is a class which inherits the GeckoWebBrowser control        
For Each element As GeckoElement In Me.DomDocument.GetElementsByTagName("span")
    'some codes here
Next

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Bootstrap Modal In ASP.NET MVC With CRUD Operations