Silverlight Xaml 和 asp.net 页面之间跳转及参数传递

1 Xaml ---> asp.net

xaml:

HtmlWindow html = HtmlPage.Window;
html.Navigate(new Uri(String.Format("/WordPage.aspx?username={0}&email={1}", "xxxxx", "xxx@microsoft.com"), UriKind.Relative));

asp.net

Response.Write(Request.QueryString["username"]);
Response.Write(Request.QueryString["email"]);

2 asp.net ---> xaml

asp.net

Response.Redirect(String.Format("SBTOSNewTestPage.aspx?username={0}&email={1}", "xxxx", "xxxxx@microsoft.com"));

xaml

IDictionary<String, String> paras = HtmlPage.Document.QueryString;
this.textBlock1.Text = paras["username"];
this.textBlock1.Text += paras["email"];

原文地址:https://www.cnblogs.com/xh831213/p/1829297.html