Add the following code to your base page and base user control.
protected TItem Eval<TItem>()
{
return (TItem)GetDataItem();
}
Register the namespace of your entities in the import directive or in web.config an use the new Eval instead of the standart one. You get speed and intellisense.
<%= Eval<Person>().Name %>
Комментариев нет:
Отправить комментарий