ExpandoObject对象的绑定问题

系统的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 }

 

posted @ 2010-11-25 18:56  David.Yang  阅读(402)  评论(0编辑  收藏  举报