title: Binding ListView Field to Value in Code-Behind
body: <p>I'm displaying fields from a DB call in a ListView. I had to re-code my database query because of an issue with repeating groups. I also didn't want to have to deal with nested ListViews. So now I am trying to set the header to the value of radio button list selection. I was trying to write a custom method to return that value but could not remember the syntax.</p>
  
  <p>How can I set the header in the LayoutTemplate from the code-behind so that it doesn't repeat?</p>
  
  <pre><code>&lt;LayoutTemplate&gt;
      &lt;div class="resultsGrid"&gt;
          &lt;strong&gt;&lt;%# GetHeader() %&gt;&lt;/strong&gt;
          &lt;asp:PlaceHolder runat="server" ID="resultsPlaceHolder"&gt;
          &lt;/asp:PlaceHolder&gt;
      &lt;/div&gt;
  &lt;/LayoutTemplate&gt;
  &lt;ItemTemplate&gt;
      // rest of data
  &lt;/ItemTemplate&gt;
  </code></pre>