How can I get the page title in WebBrowser control?

后端 未结 6 646
挽巷
挽巷 2021-02-13 20:00

How can I get the page title in a WebBrowser control when I navigate to different websites?


xmlns

xmlns:phone=\"clr-namespace:Microsoft.Phone.Contr         


        
6条回答
  •  长情又很酷
    2021-02-13 21:03

    All answers are not 100% correct:

    You must call the following:

    String title = (string)browser.InvokeScript("eval", "document.title.toString()");

    in the LoadCompleted event of the browser, and not in the navigated event.

提交回复
热议问题