axWebBrowser control how to???

Posted on 2006-04-08
Last Modified: 2010-04-16

I have a form in wich i have a text box for the URL, a Go button and a axWebBrowser control.

I enter an address into the textbox, after wich i hit the go button.

I want to make the textbox change the location (it's text property), after links are selected in the axWebBrowser control (keep track of the current link).

How can i make this?

P.S. I need only C# examples. Thank you very much.
Question by:drcyrus3d
    LVL 85

    Accepted Solution

    When the DocumentCompleted() event fires, set your TextBox to the current URL:

           private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
                textBox1.Text = webBrowser1.Url.ToString();
    You can also use the Navigated() or Navigating() events.
    LVL 1

    Author Comment

    Thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now