title: Better way to hide titles in Sitecore/ASP.NET
body: <p>I'm using Sitecore and just getting the hang of working within ASP.NET. We don't have a second Sitecore license for a development server, so I have to do everything live fire on the site (ack!), so I am trying to avoid working with code behinds due to the necessity of a recompile/DLL insert.</p>
  
  <p>I'm just trying to hide a section header if the following section is empty. I've come up with this,  which definitely works, but it seems pretty bulky:</p>
  
  <pre><code>&lt;% if (!string.IsNullOrEmpty(Sitecore.Context.Item.Fields["Grades"].ToString())) { %&gt;&lt;h2 class="edu"&gt;Timeframe&lt;/h2&gt;&lt;% } %&gt;
      &lt;sc:FieldRenderer runat="server" ID="mhTimeFrame" Fieldname="Timeframe" /&gt;
  </code></pre>
  
  <p>Is there a more straightforward way to do this? </p>
  
  <p>By the way: I'm aware that Sitecore can utilize XSLT templates but our site was built without utilizing XSLT so I'd like to stick to one paradigm so that a future developer can make sense of this.</p>