My app is a windows phone 7 application. In that i have created a UrlTextBox in MainPage.xaml and created a web browser control(browsers) in another page(Browser.xaml). If the user types some URL in the textbox and clicked on Go Button, i need to navigate from MainPage.xaml to Browser.xaml and even the web page should also load in Browser.xaml(i.e, whatever the URL typed by the user) in a single button click(GoBtn_Click). I used the Navigation service for the above, but it throws an error that “browsers” does not exist in the current context.
Need help for this. Thanks in advance for your help.
My app is a windows phone 7 application. In that i have created a
Share
I might be misunderstanding the question, but I think you’re confusing NavigationService.Navigate and WebBrowser.Navigate. You can’t do everything you said you wanted to do with just the navigation service.
First, store the URL. Then use this code to navigate to the Browser page:
Then, once on the browser page, tell the WebBrowser to navigate to the supplied URL.