Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 173749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:23:54+00:00 2026-05-11T13:23:54+00:00

I’m trying to use a .Net WebBrowser control to log into a website and

  • 0

I’m trying to use a .Net WebBrowser control to log into a website and aggregate some data for me. I’m also using a reference to MSHTML (but I don’t care if your solution does or doesn’t).

When I visit a ‘normal’ website – I create an mshtml.HTMLDocument from the webBrowser’s .documment. Then I create a mshtml.FormElement and a mshtml.HTMLInputElement using the name of the textbox I want.

Then, I can set the value of the textBox.

It looks something like this:

    Dim myDoc1 As mshtml.HTMLIFrame = DirectCast(Me.WebBrowser.Document.DomDocument, mshtml.HTMLDocument)     Dim myForm As mshtml.HTMLFormElement = DirectCast(myDoc1.forms.item(0), mshtml.HTMLFormElement)     Dim myUserBox As mshtml.HTMLInputElement = DirectCast(myForm.item('user'), mshtml.HTMLFormElement)      myUserBox.value = UserName 

My problem is that on some websites the textbox I need to manipulate is contained inside of an IFRAME. An example would be https://servicing.capitalone.com/c1/login.aspx

If my program surfs to that site – it can’t find a textbox for the Username – because there isn’t one. There is only an IFRAME tag that has a URL of ‘https://login.capitalone.com/loginweb/login/login.do‘

If I surf directly to the login.do page – the website redirects me to an error page.

How can I enter data into the UserName textbox in that IFRAME?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:23:54+00:00Added an answer on May 11, 2026 at 1:23 pm

    Because the child iframe you are trying to access is coming from a different domain than the parent page, you won’t be able to access the form elements of the iframe due to cross-frame scripting security. See: Accessing Frames in the Managed HTML Document Object Model

    Access to frames is complicated by the fact that the managed HTML DOM implements a security measure known as cross-frame scripting security. If a document contains a FRAMESET with two or more FRAMEs in different domains, these FRAMEs cannot interact with one another. In other words, a FRAME that displays content from your Web site cannot access information in a FRAME that hosts a third-party site such as http://www.adatum.com/. This security is implemented at the level of the HtmlWindow class. You can obtain general information about a FRAME hosting another Web site, such as its URL, but you will be unable to access its Document or change the size or location of its hosting FRAME or IFRAME.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 106k
  • Answers 106k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Keeping your data lying around in a header makes it… May 11, 2026 at 8:55 pm
  • Editorial Team
    Editorial Team added an answer By DOM Parser, do you mean javascript? If so, this… May 11, 2026 at 8:55 pm
  • Editorial Team
    Editorial Team added an answer I think Eugene's reply in this thread is properly describing… May 11, 2026 at 8:55 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.