我正在寻找一种方法来打开我的silverlight应用程序从我的web应用程序使用javascript。在此过程中,我还需要向silverlight应用程序传递一个字符串。下面的代码将为我打开silverlight应用程序。我需要知道如何在将字符串值传递给silverlight时做到这一点。
$(function () {
$('.cell').on('focus', 'textarea', function () {
var inputValue = $(this).val();
window.open('/TestPage.aspx');
});});
注意:我到处寻找这个问题的答案,但似乎找不到一个像样的解决方案。我找到的所有演示都是不完整的,或者功能不像预期的那样。
发布于 2013-10-12 04:46:19
您可以在查询字符串中传递它:
window.open('/TestPage.aspx?input=' + inputValue);使用HtmlDocument.QueryString在Silverlight中检索它
string inputValue = null;
if (HtmlDocument.QueryString.ContainsKey("input"))
inputValue = HtmlDocument.QueryString["input"];https://stackoverflow.com/questions/19326616
复制相似问题