Why are the InitParams I pass into Silverlight always empty?

半腔热情 提交于 2019-12-11 14:49:41

问题


My Silverlight application needs one parameter, an integer. In my Html, I have written:

<param name="InitParameters" value="UserId=1" />

In code I am reading the parameters in:

foreach (KeyValuePair<string, string> pair in e.InitParams)
{
    Resources.Add(pair.Key, pair.Value);
}

e.InitParams is always empty. Any ideas?


回答1:


Because I'm passing in "InitParameters" instead of "InitParams". That's what I get for staring at my code for too long.



来源:https://stackoverflow.com/questions/3144666/why-are-the-initparams-i-pass-into-silverlight-always-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!