If you ever tried or try to bind an Repeater control with a data source that have a period or dot in its one/more data item’s name then you might receive a error while binding the property using DataBinder.Eval method.
For Example, I was trying to do a simple thing with Asp Repeater control (which is bind to a DataTable). Please see the following piece of code
<%# DataBinder.Eval(Container.DataItem, "alt.price")%>
Here is a column name "alt.price" in the data source (DataTable) . But the above line was resulting an error as follows
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'alt'
To resolve this issue I used a new Method ‘DataBinder.GetPropertyValue’ that simply retrieves property value without any evaluation on the expression while DataBinder.Eval method uses reflection to parse and evaluate a data-binding expression against an object at run-time.
Conclusion – If you don't want that the expression to be evaluated at the run time, it’s a good practice to use GetProtperyValue method instead of Eval method.