B
Ben
Hi.
We use the <%# DataBinder.Eval
(Container.DataItem, "ColumnName") %> construct quite a
bit.
Is it possible to use this expression from a chunk of
client side code that isn't a data binding expression? For
example to display or hide a table row depending on one of
the values from the database.
For example:
<%
if(DataBinder.Eval(Container.DataItem, "ColumnName") ==
1)
{
%>
<tr><td>Special Offer!</td></tr>
<%
}
%>
I've tried using public strings from the server to the
client, but this breaks down when using them within a
repeater for many items.
Any suggestions would be welcome!
Thanks
Ben
We use the <%# DataBinder.Eval
(Container.DataItem, "ColumnName") %> construct quite a
bit.
Is it possible to use this expression from a chunk of
client side code that isn't a data binding expression? For
example to display or hide a table row depending on one of
the values from the database.
For example:
<%
if(DataBinder.Eval(Container.DataItem, "ColumnName") ==
1)
{
%>
<tr><td>Special Offer!</td></tr>
<%
}
%>
I've tried using public strings from the server to the
client, but this breaks down when using them within a
repeater for many items.
Any suggestions would be welcome!
Thanks
Ben