Getting Value from databound control in desgn mode

R

Remco

Hello,

I know that in a databound control I can render the value of a certain field
with the syntax <%#Eval("PROD_NAME")%>.
But how do I, in design mode (not in code behind), display something
depending on the value of a field.

<Gridview control....>

<ItemTemplate>
<%If #Eval("PROD_STOCK_SIZE") > 0 then %>
...display some text....
<%End if%>

</ItemTemplate>

</Gridview control...>

This doen't work, what is the workaround?

Kind regards

Remco
 
B

bruce barker

don't know vb, in c# its:

<%# ((int) Eval("PROD_STOCK_SIZE")) > 0 ? "string 1" : "" %>

-- bruce (sqlwork.com)
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top