Repeater

25/02/2005 - 21:31 por Anonimo | Informe spam
Hola, tengo una página con un control Repeater, así

<asp:repeater ... >

<itemtemplate>
<tr>
<td><%# DataBinder.Eval (
Container.DataItem, "ProductID" ) %></td>
<td align="right"><%# DataBinder.Eval (
Container.DataItem,
"UnitPrice", "{0:c}" ) %>
</td></tr>
</itemtemplate>

</asp:repeater>


Cómo podría llamar -en el itemtemplate- a una función que
genere html, pasando el valor de un dato:

llamada seŽria algo así

Valoracion(<%# DataBinder.Eval ( Container.DataItem,
"UnitPrice", "{0:c}" ) %>)


public string Valoracion(Decimal Precio)
{
Generar HTML que aparecería en ItemTemplate !!!
}


Un saludo.
 

Preguntas similares