CoesolfHelt
New Member
Im using a datalist to show some data from the database and populating the fields on the html side. I now have a requirement to change the visibility of a panel based on whether or not a db field has data or not.I need to be able to show the panel if the relevant data field has content, and hide it if it doesnt. Eg:\[code\] <aspanel ID="pnlNew" runat="server" Style="margin:0; padding:0; width:42px; height:18px; bottom:5px; right:10px; float:right; position:relative; background:url(../_imgVideoBadge.png) no-repeat;" Visible='<%# Eval("cheese") != null %>' ToolTip="available"></aspanel>\[/code\]Obviously this doesn't work in terms of the visible property. But hopefully it gives an idea of what Im trying to achieve. Any help would be greatly appreciated.Ive seen examples previously of doing something along the lines of:\[code\] a ?? b:c\[/code\]How could this be applied to the above requirement??Thanks in advance.