So i made a Login Form Which i type in to a 2 textbox a value and it will login to the site now here is where im stuck
> Lets Say i want to know my balance of $ in a site i want to Auto Login to the site do it with the program
> now The Balance is lets say 6 Columns 
> NAME | Balance | Refers | last name | username | sitename 
> squizy | 4$         | blabla   | dadada    | squizy       | daniweb.com  (Just an example)
> Now What im actuly trying to do is that every text here will be generated into my listview Box.... 
> So i got the name of what i need its "
    <span class="defdark"> squizy </span>"
> Thank You (:

Have no idea is this suppost to be like this ?
WebBrowser1.Document.GetElementById("Defdark").GetAttribute("value", ListView1.Columns)

Member Avatar for CurtisUN

Hi,
The code below will insert the data into listview rows but I am not sure of the WebBrowser1 statement. I know it returns a string but I am not sure if it contains all the values listed in the browser, 6 values for one row or just one value. So breaking down the string to useable values may have to be done in a different way.

Public Class form1
    Dim item1 As New ListViewItem
    Private Sub form1_Load(ByVal sender As System.Object, _
                           ByVal e As System.EventArgs) Handles MyBase.Load
        ListView1.View = View.Details
        ListView1.Items.Clear()
        ListView1.Enabled = True
        ListView1.Columns.Add(" NAME ")
        ListView1.Columns.Add(" Balance ")
        ListView1.Columns.Add(" Refers ")
        ListView1.Columns.Add(" last name ")
        ListView1.Columns.Add(" username ")
        ListView1.Columns.Add(" sitename ")
        ListView1.AutoResizeColumns(System.Windows.Forms.ColumnHeaderStyle.Clickable)
        Dim items As String = WebBrowser1.Document.GetElementById _
                              ("Defdark").GetAttribute("value")
        Dim splitstring() As String = Split(items, "|")
        item1 = New ListViewItem(splitstring(0))
        For x = 1 To splitstring.Length - 1
            item1.SubItems.Add(splitstring(x))
        Next
        ListView1.Items.Add(item1)
    End Sub
End Class

Curtis

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.