G
Guest
I'm having some major problems trying to get a user control working in
asp.net 2.0.
I have a user control in a sub directory of my project and I'm attempting to
put it on an aspx page. I'm getting an error like the following, though:
The base class includes the field 'MyUserControl', but its type
(Controls.MySubControls.MyUserControl) is not compatible with the type of
control (ASP.controls_mysubcontrols_myusercontrol_ascx).
The ascx is defined with:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="MyUserControl.ascx.cs"
Inherits="Controls.MySubControls.MyUserControl" %>
In the aspx, I reference the user control via something like:
<%@ Register TagPrefix="uc" TagName="MyUserControl"
Src="~/Controls/MySubControls/MyUserControl.ascx" %>
and later in the page via:
<uc:MyUserControl id="MyUserControl" runat="server" />
I'm stumped, so any help w/ this would be appreciated.
Thanks
Jim
asp.net 2.0.
I have a user control in a sub directory of my project and I'm attempting to
put it on an aspx page. I'm getting an error like the following, though:
The base class includes the field 'MyUserControl', but its type
(Controls.MySubControls.MyUserControl) is not compatible with the type of
control (ASP.controls_mysubcontrols_myusercontrol_ascx).
The ascx is defined with:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="MyUserControl.ascx.cs"
Inherits="Controls.MySubControls.MyUserControl" %>
In the aspx, I reference the user control via something like:
<%@ Register TagPrefix="uc" TagName="MyUserControl"
Src="~/Controls/MySubControls/MyUserControl.ascx" %>
and later in the page via:
<uc:MyUserControl id="MyUserControl" runat="server" />
I'm stumped, so any help w/ this would be appreciated.
Thanks
Jim