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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.