Can you evaluate a databinding expression?

S

sydney.luu

Hello,

See part of the code shown below. I would like to know, without
hooking to an event
called ContentRepeater_ItemDataBound, is it possible to evaluate this
databinding expression
and based on the condition, create a LinkButton immediately follows
this data and before
this <TD> ends? Basically, how I can code it to say:

If DataBinder.Eval(Container.DataItem, "CreateLinkButton") = "Y" Then
<ASP:LinkButton ....................>
End If

Thanks for the help!
Sydney






<asp:Repeater id="ContentRepeater" runat="server"
EnableViewState="False"
OnItemDataBound="ContentRepeater_ItemDataBound">

<ItemTemplate>
<tr id="TableRow" runat="server" bgcolor="#FFFFFF">
<td> <%# DataBinder.Eval(Container.DataItem,
"CreateLinkButton") %></td>
 
K

Karl Seguin [MVP]

It's pretty safe to ignore my comment. Without knowing more about your
system, I can only guess. It just _seems_ like presentation rules (ie, show
this button or not) are being decided by something other than the
presentation layer. But that could be a totally inaccurate view.

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top