Reputation: 341
In my windows store application , i am passing some parameters between two pages like this:
Window.Current.Content = new page2(a1,a2,a3);
and accessing that parameters in page2 like this :
public page2(string a1, string a2, string a3)
{this.InitializeComponent();}
everything works fine, but when i am trying to navigate from page2 to another page , a null exception is occurring. what is the problem ??
Upvotes: 0
Views: 2575
Reputation: 1347
Please check the following thread. Possible you can follow this solution for resolve your issue.
Or you can try that too:
var frame = (Frame)Window.Current.Content;
frame.Navigate(typeof(Page3));
Upvotes: 3
Reputation: 341
I have solved the issue by using this kind of navigation Window.Current.Content = new page2();
instead of this this.Frame.Navigate(typeof(page));
Upvotes: 3