ExpandoObject对象的绑定问题

it2026-03-14  5

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

 

转载于:https://www.cnblogs.com/davidyang78/archive/2010/11/25/1888012.html

最新回复(0)