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]");
精彩评论