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