I have an aspx page which contains a repeater. I can output data using Eval() but I want to know if it is possible to call a method that belongs to another class and pass it the value of Eval()?
For example, in the <ItemTemplate>
section of the repeater:
<ItemTemplate>
<tr>
<td>
<%# ClassName.Method( Eval("value1") ) %>
</td>
<td>
<%# Eval("value2") %>
</td>
</tr>
</ItemTemplate>
If it is possible to do this, what is the correct way to do it?
Yes, but you need to provide the full name and to cast the result of the Eval function, which returns System.Object instances.
Here, method is public static, but you can use instance methods also.