Change Value on a website via VB
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Hello.
I am attempting to make a tiny little program for a college challange to auto fill in a form online i have done fine with text using this code but now i have to select an item from a combobox and i attempted to do it in the same manior with the code below
I am attempting to make a tiny little program for a college challange to auto fill in a form online i have done fine with text using this code but now i have to select an item from a combobox and i attempted to do it in the same manior with the code below
Code: Select all
it does not seem to work though does anyone know how to do this please Dim buying As HtmlElement = WebBrowser1.Document.All.Item("type")
buying.InnerText = ComboBox1.Text
I would try this:
Code: Select all
Dim buying As HtmlElement = WebBrowser1.Document.All.Item("type")
buying.SetAttribute("value", ComboBox1.Text)
Thank you but this does not work, it just changes it to blank text
going to keep this post open for a wee bit as their may be a more efficant way to do this but thanks to your post i just figured out what i did wrong thank you. here is the working code
Code: Select all
Dim buying As HtmlElement = WebBrowser1.Document.All.Item("type")
If ComboBox1.Text = "Buying" Then
buying.SetAttribute("value", "0")
Else
buying.SetAttribute("value", "1")
End If
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023