Ramesh
Ramesh

Reputation: 422

Passing String to next XAML Page

I am developing Windows Store App using C# and XAML. I would like to pass a string when moving from one page to another. For example,

 private void filterData_Click(object sender, RoutedEventArgs e)
    {
           string str="mydata";
           this.Frame.Navigate(typeof(QualityRecordsResults));
    }

I need this str value in QualityRecordsResults.xaml.cs file.

Upvotes: 2

Views: 619

Answers (1)

Jehof
Jehof

Reputation: 35544

You can use an overload of the Navigate method to pass the string to your view.

string str="mydata";
this.Frame.Navigate(typeof(QualityRecordsResults), mydata);

Upvotes: 4

Related Questions