开发者

Silverlight Javascript - Access and setting value of xaml's textbox in javascript

I have a text box named myTextbox in 开发者_JAVA技巧my xaml page, my question is how can i set it's text through javascript from my aspx page.


Create a public string property in the silverlight side, mark it with the ScriptableMemberAttribute, and bind the textbox text property to this public property. The property marked with the ScriptableMemberAttribute is visible to javascript.

The code to access a silverlight property from javascript depends on the names you have used for those objects, but you have examples here on how to access them:

http://msdn.microsoft.com/en-us/library/cc221414%28v=VS.95%29.aspx

More info on making silverlight objects visible to javascript : http://msdn.microsoft.com/en-us/library/cc645085%28v=VS.95%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜