private void goNavigateButton_Click(object sender, RoutedEventArgs e)
{
// Get URI to navigate to
Uri uri = new Uri(this.addressTextBox.Text, UriKind.RelativeOrAbsolute);
// Only absolute URIs can be navigated to
if (!uri.IsAbsoluteUri)
{
MessageBox.Show("The Address URI must be absolute eg 'http://www.microsoft.com'");
return;
}
// Navigate to the desired URL by calling the .Navigate method
WebBrowser1.Navigate(uri);
string s = WebBrowser1.Document.getElementById("txt1").Value;
}