Hi, am having trouble with visible attribute of an asp.net panel. Basically I have a page that calls a database table and returns the results in a detailsview. However, some of the values that are returned are null and if so I need to hide the image thats next to it.
I am using a panel to determine whether to hide or show the image but am having trouble with the statement:
visible='<%# Eval("addr1") <> DBNull.Value %>'
I have tried these as well:
visible='<%# Eval("addr1") <> DBNull.Value %>'
visible='<%# IIf(Eval("addr1") Is DbNull.Value, "False","True") %>'
When I use these I get the error:
Compiler Error Message: CS1026: ) expected
Any help on what the syntax should be would be great.
Thanks