Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. webBrowser.Url == null ?

webBrowser.Url == null ?

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ZenyukIV
    wrote on last edited by
    #1

    Could You please provide me with solution I have a panel and only one control on it - WebBrowser control. When I try to access to webBrowser.name is OK, but webBrowser.Url == null WebBrowser webBrowser = webBrowserTabControl.SelectedPanel.Controls[0] as WebBrowser; webBrowsersCollection.SelectedWebBrowser = webBrowser.Name; currentURL = **webBrowser.Url**.ToString(); Thanks in advance

    P L 2 Replies Last reply
    0
    • Z ZenyukIV

      Could You please provide me with solution I have a panel and only one control on it - WebBrowser control. When I try to access to webBrowser.name is OK, but webBrowser.Url == null WebBrowser webBrowser = webBrowserTabControl.SelectedPanel.Controls[0] as WebBrowser; webBrowsersCollection.SelectedWebBrowser = webBrowser.Name; currentURL = **webBrowser.Url**.ToString(); Thanks in advance

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Have you browsed to a URL? If not, the Url property is going to be null. You should check this before calling the ToString() method on the Uri object instance.

      Paul Marfleet

      Z 1 Reply Last reply
      0
      • Z ZenyukIV

        Could You please provide me with solution I have a panel and only one control on it - WebBrowser control. When I try to access to webBrowser.name is OK, but webBrowser.Url == null WebBrowser webBrowser = webBrowserTabControl.SelectedPanel.Controls[0] as WebBrowser; webBrowsersCollection.SelectedWebBrowser = webBrowser.Name; currentURL = **webBrowser.Url**.ToString(); Thanks in advance

        L Offline
        L Offline
        laserbaronen
        wrote on last edited by
        #3

        probably because it has no url set?

        fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.

        1 Reply Last reply
        0
        • P pmarfleet

          Have you browsed to a URL? If not, the Url property is going to be null. You should check this before calling the ToString() method on the Uri object instance.

          Paul Marfleet

          Z Offline
          Z Offline
          ZenyukIV
          wrote on last edited by
          #4

          Thank for all I created additional dictionary to collect URL, becouse it seems to me that WebBrowswer has URL property resolved after "web paged displayed", But I can't create additional thread to wait while it will be finised -- modified at 8:29 Thursday 1st November, 2007

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups