1
Answer

An object reference is required for the non-static field, me

JOHN JOHNNNY

JOHN JOHNNNY

9y
926
1
Hi
 
I am trying to use a browser control in my app but am getting the following error
"Error 1 An object reference is required for the non-static field, method, or property 'Microsoft.Phone.Controls.WebBrowser.Source.get'"
 
Here is my code below

public Page2()         {             InitializeComponent();               Loaded += Page2_Loaded;         }           void Page2_Loaded(object sender, RoutedEventArgs e)         {             search.Tap += search_Tap;         }           void search_Tap(object sender, System.Windows.Input.GestureEventArgs e)         {             WebBrowser.Source = new Uri(URLTextBox.Text, UriKind.Absolute);         }

Kindly help
Answers (1)