Jump to content

vb.net enter text in a text box with out value Attribute ?[need help asap]


Recommended Posts

ok well its simple i have a webbrowser controle in my application and the page i have open has a text box in it i need to put text into this text box

 

i have been using the code bellow

 

If WebBrowser1.Document.Body.InnerText.Contains("new msg") Then
            Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea")
            For Each el As HtmlElement In htmlElements
                If el.GetAttribute("class").Equals("boxy") Then
                    el.SetAttribute("Value", TextBox3.Text)
                End If
            Next
            postmsg.Stop()
        End If

 

but i just notice there is a problem the textbox i need to put the text it on the webpage dose not have the value Attribute there for no text is entered :/ how can i get this to enter the text

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.