Question how to get a specific items from listbox

TMTakas

Member
Joined
Feb 6, 2013
Messages
15
Programming Experience
Beginner
Hi vbdotnetforums

i have this code :

VB.NET:
        For Each ele As HtmlElement In WebBrowser1.Document.Links
          
            Dim eletarget As String = ele.GetAttribute("href")
            
            ListBox1.Items.Add(eletarget)
           
        Next

But Now i want to get all items that containing the word : " starnew.php?u= " to a textbox

And from the webbrowser how can get All " starnew.php?u=XXX "
HTML:
<span style="cursor:pointer" onclick="window.open('starnew.php?u=0001', '_self')">bello100</span>

Thx :D
 
Hi vbdotnetforums

i have this code :

VB.NET:
        For Each ele As HtmlElement In WebBrowser1.Document.Links
          
            Dim eletarget As String = ele.GetAttribute("href")
            
            ListBox1.Items.Add(eletarget)
           
        Next

But Now i want to get all items that containing the word : " starnew.php?u= " to a textbox

And from the webbrowser how can get All " starnew.php?u=XXX "
HTML:
<span style="cursor:pointer" onclick="window.open('starnew.php?u=0001', '_self')">bello100</span>

Thx :D

you can check out the listbox.findstring method.

ListBox.FindString Method (String) (System.Windows.Forms)

That would probably do the trick for you!
 
Back
Top