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

推荐订阅源

F
Fortinet All Blogs
WordPress大学
WordPress大学
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
博客园 - Franky
D
Docker
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
U
Unit 42
M
MIT News - Artificial intelligence
B
Blog
GbyAI
GbyAI
C
Check Point Blog
P
Proofpoint News Feed
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
IT之家
IT之家
Google DeepMind News
Google DeepMind News
V
V2EX
Stack Overflow Blog
Stack Overflow Blog

博客园 - 广思

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