通过 blockcomponent将数据压入页面中,在MyFirstComponent类中处理参数
获取方式使用Context.ComponentParameters["Params"];
Example
#component(MyFirstComponent "%{firstParam='some value',anotherParam='other value'}")You can then access the parameters from the component code: 
public class MyFirstComponent: ViewComponent
...{
public override void Render()
...{
object param1 = Context.ComponentParameters["firstParam"];
object param2 = Context.ComponentParameters["anotherParam"];
...
}
}
发表于 @ 2006年10月11日 10:50:00 | 评论( loading... ) | 举报| 收藏