Personal I have a field:
IsettoautomaticallyfillinVB
:
Me.WebBrowser1.Document.GetElementsByTagName("select").GetElementsByName("NW_State").Item(0).SetAttribute("value", "AK")
But it's not going to work, I've tried it in many ways.
Personal I have a field:
IsettoautomaticallyfillinVB
:
Me.WebBrowser1.Document.GetElementsByTagName("select").GetElementsByName("NW_State").Item(0).SetAttribute("value", "AK")
But it's not going to work, I've tried it in many ways.
You can retrieve child items from select
and iterate through them by selecting the one that has the searched text:
Dim htmlElm As HtmlElement = Me.WebBrowser1.Document.GetElementsByTagName("select").GetElementsByName("NW_State").Item(0)
For Each item As HtmlElement In htmlElm.Children
If (item.InnerHtml = "AZ") Then
item.SetAttribute("selected", "selected")
Else
item.SetAttribute("selected", String.Empty)
End If
Next