惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
月光博客
月光博客
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
博客园 - 司徒正美
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
博客园 - 聂微东

博客园 - 广思

IIS中加入piwik跟踪代码 注册表中启用对没有标记为安全的 ActiveX 控件进行初始化和脚本运行 安装Qvode后,在IE8的菜单工具中会出现《彩票》 将字符串写入图片 TRUNCATE 删除表内所有记录 Windows Server 2003 SP1本机访问报错-环回检查 SQL Server 镜像部署 使用stsadm.exe工具实现SharePoint网站备份还原 不能打开文件:mk:@MSITStore:路径[cannot open the file mk@MSITstore:路径]解决办法 转 取得 SharePoint 中列表的Guid和列表视图的Guid (List's Guid and List View Guid) 安装Active Directory Tools For SharePoint 后无法添加到页面的原因 DirectoryEntry所有字段对应解释 windows picture and fax viewer 失效 验证配置设置时发生错误,已引发类型为System.Runtime.InteropServices.COMException的异常。其他异常信息:系统找不到指定的路径 Error message when you try to install a SQL Server 2005 service pack or a SQL Server 2005 hotfix package: "Error 29528. The setup has encountered an unexpected error while Setting Internal Properties" Excel With ADO.NET:Cannot modify the design of table ‘xxx′. It is in a read-only database 常用MSSQL语句:每个表大小,某个表所有列 Sql Server备份到远程服务器的另一种方法 查看 MSSQL 中数据表大小的方法
通过Object传递参数
广思 · 2009-06-26 · via 博客园 - 广思

Tip: How to pass initialize parameters to Silverlight application using <object> element? 

If you want to pass initialize parameters to Silverlight application from an HTML/ASPX page, you have to find the place where your Silverlight control is inserted into the page using the <object> element and insert the bold line bellow.

HTML

<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="100%"> 
    ...
    <param name="initParams" value="param1=value1,param2=value2" />
    ...
</object>

As you can see you have to insert one new element <param name="initParams" value="parameters"/> as a child of the <object> element. The syntax for parameters definition is pretty straightforward - you just have to enumerate all parameters and their values separated by commas like this: "parameter1=value1,parameter2=value2,parameter3=value3". Once the initialize parameters have been defined, you can obtain them in your application startup event handler using the InitParams property of the StartupEventArgs like this:

C#

private void Application_Startup( object sender, StartupEventArgs e )
{
    //... Other code here ...
    string param1Value = e.InitParams[ "param1" ];

That's it!

http://www.silverlightshow.net/tips/How-to-pass-initialize-parameters-to-Silverlight-application-using-object-element.aspx