none
Web Browser function...

    Question

  • I want to make it to where when a user clicks on a link within a website on the browser, it puts that links URL in the URL combobox on my application. I also want my refresh button to be able to refresh the current page thats listed in the combobox. The way it works now, If I type in the URL, it works, but when I click on a URL from within the webbrowser (say I click on a earch result in google), the www.google.com URL will still remain the combo box.

     

    Can someone please tell me the code to make this happen?

     

    Thanks!

    Wednesday, December 27, 2006 2:40 PM

Answers

  • You can hook to the document completed event of the web browser control and then set the combo box to the url of the web browser control.
    Wednesday, December 27, 2006 3:41 PM
  • Just set the focus to the web browser control than in the property window hit the lightning bolt icon and choose DocumentCompleted from the list, double click that and start typing:

    this.textBox1.Text = this.webBrowserControl.Url.ToString();

    Wednesday, December 27, 2006 11:01 PM

All replies

  • You can hook to the document completed event of the web browser control and then set the combo box to the url of the web browser control.
    Wednesday, December 27, 2006 3:41 PM
  • How di I do that? Sorry, I'm new to this. Thanks
    Wednesday, December 27, 2006 10:55 PM
  • Just set the focus to the web browser control than in the property window hit the lightning bolt icon and choose DocumentCompleted from the list, double click that and start typing:

    this.textBox1.Text = this.webBrowserControl.Url.ToString();

    Wednesday, December 27, 2006 11:01 PM
  • Got it now... Thanks for putting up with my ignorance.
    Thursday, December 28, 2006 1:10 AM