CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    22

    Insert text into webpage textbox

    Hi,
    I used WebBrowser to load a webpage in my dialog. Now I want to insert text into a webpage's textbox (e.g., username textbox on gmail), but I have not thought how to solve this problem yet. Please help me again!
    Thanks so much.

  2. #2
    Join Date
    Jul 2003
    Location
    Springfield
    Posts
    190

    Re: Insert text into webpage textbox

    have you found a solution for this issue?
    Mr. Burns

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Insert text into webpage textbox

    If you need to do this automatically, you can use Active Accessibility.

  4. #4
    Join Date
    Aug 2011
    Posts
    20

    Re: Insert text into webpage textbox

    I would like to know that too

    I found this:
    Code:
    Use the document property to get a reference to the loaded document in the control. You can then use the GetElementById to get a reference to the textbox element. Then you can use the SetAttribute on the element to set its "value" and the InvokeMember to "submit" the form.
    but thats hard to understand without code examples for a beginner

  5. #5
    Join Date
    Aug 2011
    Posts
    20

    Re: Insert text into webpage textbox

    come on guys,
    there gotta be someone who can help solve the puzzle

  6. #6
    Join Date
    Aug 2011
    Posts
    20

    Re: Insert text into webpage textbox

    OK I almost got it now,

    The only problem left is that I cant click the button on the Site,
    I tried:
    Code:
     webBrowser1.Document.GetElementById("button").InvokeMember("click");
    
    and
    
      webBrowser1.Document.All["button"].InvokeMember("click");
    I also tried some other codes but failed

    the site where the button is is: linksafeme.me

  7. #7
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Insert text into webpage textbox

    prince1, please do not revive old threads. Make a new one

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured