现在的位置: 首页 > 综合 > 正文

ExpandoObject对象的绑定问题

2012年10月12日 ⁄ 综合 ⁄ 共 281字 ⁄ 字号 评论关闭

系统的Eval处理不了,要重写页面或者用户控件的Eval:

 

1 protected new object Eval(string expression)
2 {
3 object obj = this.Page.GetDataItem();
4 IDictionary<string, object> items = obj as IDictionary<string, object>;
5 if(items != null)
6 return items[expression];
7 else
8 return DataBinder.Eval(this.Page.GetDataItem(), expression);
9 }

 

抱歉!评论已关闭.