Reputation: 179
I'm creating an app for the windows phone platform, and need to get the websites title as the user navigates through the web.
I have tried many ways, but it just doesn't seem to work. Any ideas ?
This is what i have :
String title = (string)browser.InvokeScript("eval","document.title.toString()");
Upvotes: 0
Views: 487
Reputation: 4817
I don't know why the above answer was accepted as the right one:
The following line should work:
string webTitle = (string)Browser.InvokeScript("eval", "document.title.toString()");
if you call this in the navigated event it may not work, you MUST call this in Browser_LoadCompleted event, because only here all background processes finished and the invokeScript would work
Upvotes: 2