It is fine to use Eval. You do pay for this some performance penalty, but it
might be insignificant. You gain independence of the datasource. Whether it
is a table, or an array or whatever else, Eval takes care of it.
The alternative is to have expressions like
<%# ((DataRowView)Container.DataItem)["BookTitle"] %>
This is good for a datatable, but won't work if you change the datasource to
an array.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Newish" <ah*******@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi
Is it really not recommended to us Eval in databound controls as
follows:
<td><asp:TextBox id="BookTitle" Runat="Server"
Text='<%# Eval("BookTitle") %>'
Font-Size="8pt" Width="80px"/></td>
If so what is the alternative.
Thanks
Newish