Im trying to transfer a string-variable to another page. In Main Page code looks like:
Page p1 = new Page1();
NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
p1.lalala("sdfsdfsd");
in Page1 code looks like:
public partial class Page1 : PhoneApplicationPage
{
public Page1()
{
InitializeComponent();
}
public void lalala(string i)
{
textBlock1.Text = i;
}
}
and of course, nothing happens, textblock remains empty. and should not, i know.
i really don’t know how i can quickly transfer to another page the value of a variable.
I say thanks in advance and sorry for really stupid question.
pass it on the uri in navigate, like
and then retrieve it from the query string in the navigation event in
Page1