What is wrong about the way i am using OR in this code line?

M

Miguel Dias Moura

Hi,

i want to make a table visible if any of 3 database field values are
different from "".

The code i have is this:

visible='<%# dataSetPerson.FieldValue("Value1", Container) <> "" OR
dataSetPerson.FieldValue("Value2", Container) <> "" OR
dataSetPerson.FieldValue("Value3", Container) <> "" %>'

This is not working. I am using ASP.NET / VB.

Thanks,
Miguel
 
C

Cor Ligthert

Hi Miguel,

When I see it good, than you are using the bitwise operator which gives a
value to the html panel which is probably unpredictable.

I showed you a sample how to do it, use it or try it.
And to not mix it up you can better use OrElse

Cor
 

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

Top