title: Inheriting from an ASP.NET web control: "Element <name> is not a known element"
body: <p>I'm attempting to create a custom calendar control that inherits from ASP.Net's built in calendar user control. </p>
  
  <p>the code-behind file for my control looks like this:</p>
  
  <pre><code>public partial class WeeklyEventsCalendar : Calendar
  {
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  }
  </code></pre>
  
  <p>and compiles fine. </p>
  
  <p>However, when I try to place my custom control on an aspx page:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="testbed.aspx.cs" Inherits="testbed" %&gt;
  &lt;%@ Register Src="UserControls/WeeklyEventsCalendar.ascx" TagName="WeeklyEventsCalendar"
      TagPrefix="mvs" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head id="Head1" runat="server"&gt;
      &lt;title&gt;Untitled Page&lt;/title&gt;
      &lt;link href="~/css/VitalSignsStyleSheet.css" type="text/css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
          &lt;mvs:WeeklyEventsCalendar runat="server" /&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I get a warning <strong>'Element WeeklyEventsCalendar 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.'</strong> Attempting </p>
  
  <p>I don't get any sort of 'file not found' error like I have in the past when I mis-typed the location of the file. </p>
  
  <p>When I attempt to load aspx page in a browser, I get  error CS0115: <strong>'ASP.usercontrols_weeklyeventscalendar_ascx.FrameworkInitialize()': no suitable method found to override</strong></p>
  
  <p>Which is even more confusing, because nowhere in my code do I attempt to define such a function. </p>
  
  <p>This should be really simple. Where am I going wrong?</p>