[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Frames and .NET WebBrowser Control HELP!

Posted on 2004-11-02
2
Medium Priority
?
165 Views
Last Modified: 2010-04-24
I have a form with two labels, a button and the .Net WebBrower Control on it.
My goal is to send the contents of the labels to fields on the asp form in the webbrowser control.
The following code does that just fine, but the actual form on the website I need to use, uses a top frame for navigation links!
When I try to send stuff to the webform it acts like it can only see the upper navigational frame and it wont fill out the form in the lower frame :(

How can I adjust the following code to send my stuff to that lower frame that contains the actual webform?

Thanks for any help.

Code******************************
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AxWebBrowser1.Navigate2("http:\\www.thiswebsitewithaform.com")
    End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Dim FirstName As String
        Dim LastName As String
       
        FirstName = lblFirstName.Text
        LastName = lblLastName.Text
       
        With AxWebBrowser1
            Do While Not mblnDownloadCompleted
                Application.DoEvents()
            Loop
            .Document.All("app_first_name").Value = FirstName
            .Document.All("app_last_name").Value = LastName
           

            Do While Not mblnDownloadCompleted
                Application.DoEvents()
            Loop
        End With
    End Sub
0
Comment
Question by:Matrix1000
2 Comments
 
LVL 18

Accepted Solution

by:
armoghan earned 1000 total points
ID: 12480686
either instead of getting the Main frame, give the path of the lower frame by inspecting the frameset i.e. source of HTML main file
somethink like this
AxWebBrowser1.Navigate2("http:\\www.thiswebsitewithaform.com\lowerform.asp")

or find the frames in the frameset and then send to it.
How to find frames from a page.. see this PAQ
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21166050.html
0
 
LVL 1

Author Comment

by:Matrix1000
ID: 12505923
I cant get directly to the form calling it that way, I have to login, go through a few other forms etc...
Thanks tho
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question