title: Show/Hide Database Field based on Null/Not Null ASP.NET
body: <p>I am trying to hide a data field if it is null via ASP.NET.
  I have the following setup:</p>
  
  <pre><code>&lt;script runat="server" type="text/vb"&gt;
  // target the id called test
  var test = document.getElementById("test");
  
  // if test is not empty, show
  // else hide test
  if (test.value != null){
      document.getElementById("test").style.visibility = visible;
  }else{
      document.getElementById("test").style.visibility = hidden;
  }
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;p&gt;&lt;asp:Label runat="server" id="test"&gt;&lt;%# Eval("DBField")%&gt;&lt;/asp:Label&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Am I way off here? I am getting error in whatever I try. I don't think it should be so complicated however...any thoughts/recommendations would be greatly appreciated.</p>
  
  <p>Thank you in advanced,</p>