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