How to grab text from web browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • evanc93
    New Member
    • May 2010
    • 1

    How to grab text from web browser

    I have 1 form (Form1). Within this form there is a Web Browser (webBrowser1), that automatically loads to a site. Keep this in mind for later.

    I have a text box (TextBox1). When the web browser loads, I would like to grab text from a particular ID (I already know the ID of the element) and I would like it to be put into the textbox.

    I have tried the below code but I get an error when I try to run it.
    TextBox1.Text = webBrowser1.Doc ument.GetElemen tById("ELEMENT_ ID_HERE").GetAt tribute("value" );
  • nukefusion
    Recognized Expert New Member
    • Mar 2008
    • 221

    #2
    Originally posted by evanc93
    Hi everyone,

    I have 1 form (Form1). Within this form there is a Web Browser (webBrowser1), that automatically loads to a site. Keep this in mind for later.

    I have a text box (TextBox1). When the web browser loads, I would like to grab text from a particular ID (I already know the ID of the element) and I would like it to be put into the textbox.

    I have tried the below code but I get an error when I try to run it.
    TextBox1.Text = webBrowser1.Doc ument.GetElemen tById("ELEMENT_ ID_HERE").GetAt tribute("value" );

    Please help and thanks in advance.
    Hi evanc93,

    It might be helpful to us if you can post details of the exact error message you are getting.

    Comment

    Working...