title: Element 'CompositeBoundField' is not a known element. (trying to extend BoundField server control)
body: <p>VS2010, .Net 4.0</p>
  
  <p>In trying to extend the asp.net BoundField server control, as described here:<br>
  <a href="http://iridescence.no/post/FixingBoundFieldSupportforCompositeObjects.aspx" rel="nofollow">http://iridescence.no/post/FixingBoundFieldSupportforCompositeObjects.aspx</a></p>
  
  <p>I have created a class:</p>
  
  <pre><code>using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace CustomControls
  { 
      public class CompositeBoundField : BoundField
      {
          protected override object GetValue(Control controlContainer)
          {
              object item = DataBinder.GetDataItem(controlContainer);
              return DataBinder.Eval(item, this.DataField);
          }
      }
  }
  </code></pre>
  
  <p>I've registered it from my page:</p>
  
  <pre><code>&lt;%@ Register TagPrefix="cc" Namespace="CustomControls" %&gt;
  </code></pre>
  
  <p>...and on that page, I am attempting to use it like so:</p>
  
  <pre><code>&lt;asp:GridView ID="gridDataSource" runat="server"&gt;
      &lt;Columns&gt;
          &lt;cc:CompositeBoundField DataField="Application.ApplicationName" HeaderText="ApplicationName" /&gt;
      &lt;/Columns&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>However, I am getting a compiler warning:</p>
  
  <pre><code>Element 'CompositeBoundField' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.    
  </code></pre>
  
  <p>And when I run, I get the error:</p>
  
  <pre><code>Parser Error 
  Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 
  
  Parser Error Message: Unknown server tag 'cc:CompositeBoundField'.
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>
  
  <p>I tried this:<br>
  <a href="http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx" rel="nofollow">http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx</a></p>