Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将查询字符串值从一个XAML页面传递到另一个XAML页面-Silverlight_Silverlight - Fatal编程技术网

将查询字符串值从一个XAML页面传递到另一个XAML页面-Silverlight

将查询字符串值从一个XAML页面传递到另一个XAML页面-Silverlight,silverlight,Silverlight,我在Silverlight项目中有Page1.xaml和Page2.xaml。我想在按钮的单击事件中使用代码隐藏将查询字符串值从Page1.xaml传递到Page2.xaml。你能给我提供这个的示例代码吗 1) 如何将查询字符串值从Page1.xaml传递到Page2.xaml 2) 如何在Page2.xaml中检索查询字符串值 谢谢涵盖以下问题: <HyperlinkButton NavigateUri="/Home" TargetName="ContentFrame" Content=

我在Silverlight项目中有Page1.xaml和Page2.xaml。我想在按钮的单击事件中使用代码隐藏将查询字符串值从Page1.xaml传递到Page2.xaml。你能给我提供这个的示例代码吗

1) 如何将查询字符串值从Page1.xaml传递到Page2.xaml

2) 如何在Page2.xaml中检索查询字符串值

谢谢

涵盖以下问题:

<HyperlinkButton NavigateUri="/Home" TargetName="ContentFrame" Content="home"/>
我建议您使用,这使许多处理变得更容易

if (this.NavigationContext.QueryString.ContainsKey("ProductId"))
{
    productID = this.NavigationContext.QueryString["ProductId"];
}