vb.net inline IF with OR... not evaluating
Posted
by rockinthesixstring
on Stack Overflow
See other posts from Stack Overflow
or by rockinthesixstring
Published on 2010-03-30T00:23:02Z
Indexed on
2010/03/30
0:33 UTC
Read the original article
Hit count: 293
inline-if
I'm working on a small problem where I'm trying to show/hide a panel based on two criteria
- A specific data field must not be blank
- The specific data filed must also not equal "Not Relocatable"
Unfortunately this doesn't seem to be working for me (note that setting either one or the other criteria works just fine.)
<asp:Panel runat="server" Visible='<%#If(Not String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "_236")) Or Not DataBinder.Eval(Container.DataItem, "_236") = "Not Relocatable", True, False)%>'>
<tr>
<td>
</td>
<td class="align-right lightgreen">
Buyer would consider relocating a business, if it is:
</td>
<td>
</td>
<td colspan="3">
<%#DataBinder.Eval(Container.DataItem, "_236")%>
</td>
<td>
</td>
</tr>
</asp:Panel>
Can anyone lend a hand to rectify this problem for me?
© Stack Overflow or respective owner