Why is webbrowser object Url always null?

Posted on 2009-04-23
Last Modified: 2012-05-06
In .NET 3.5 winforms, I step through with the debugger and assign a webbrowser object's Url property.  After assigning, the property is still null.  I also tried this test:

            WebBrowser w = new WebBrowser();
            w.Url = url;

where url is a valid Uri.  Any suggestions on what I'm doing wrong?
Question by:brettr
    1 Comment
    LVL 15

    Accepted Solution

    The Url property will remain null until the DocumentCompleted event has been raised.

    Have a look at the Notes section under Remarks:

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    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…

    746 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

    19 Experts available now in Live!

    Get 1:1 Help Now