开发者

Passing array from aspx.cs to xaml.cs

Is there a开发者_Python百科 way to pass an array or List<> from the aspx.cs to xaml.cs?


the only way to pass data from your aspx hosting the control to your silverlight control is using InitParams which is a dictionary. try concating your string array using some predefied separator which you set on the InitParams and split again in the silverlight control.

update

string data = string.Join("[SEP]", strList);
string InitParams = "data=" + data;

you can embed this InitParams string into your object tag. pass this via InitParams. in your silverlight application

string[] data = e.InitParams["data"].Split("[SEP]");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜