定义好的js代码。。调用silverlight的代码
function chooseFile()
{
var slhost=document.getElementById("Xaml1");
slhost.content.SilverlightLearn.myButton_Click(null,null);
}
silverlight的page代码:
HtmlPage.RegisterScriptableObject("SliverlightLearn", this);
[ScriptableMember]
public void myButton_Click(object sender, RoutedEventArgs e)
{}
运行后出现:
Line:13
Char:13
Code:0
Error:未指明的错误。
网址:http://localhost:2637/SLwithFileUploadWeb/SLwithFileUploadTestPage.aspx