Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 29, 2013 08:34 AM by sukanta
Member
24 Points
109 Posts
Jan 25, 2013 02:01 PM|LINK
Hi all:
I have a custom control
in the aspx page I do
<%@ Register Src="recomendar.ascx" TagPrefix="rec" TagName="recomendar" %>
In the control I have
<%@ Control CodeFile="recomendar.ascx.vb" Inherits="codigo"%>
And in the controls's codebehind
Partial Class codigo
Inherits System.Web.UI.UserControl
But it doesn't recognize the control in the aspx page. It tells me 'rec:recomendar is not a known control
Can u help me?
Thanks in advance
Jan 25, 2013 02:11 PM|LINK
Hi again
The exact error is
Warning 14 Element 'recomendar' 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.
Any help would be appreciated
All-Star
18655 Points
1590 Posts
Microsoft
Jan 29, 2013 08:24 AM|LINK
Hi Volar
You could follow the reference below to create custom user control with a new project, and check whether it is ok.
Create a Custom User Control in ASP.NET
hope it helps you,
Kind regards
459 Points
130 Posts
Jan 29, 2013 08:34 AM|LINK
inherits property must be same as that of the codefile that is "recomendar"
so change <%@ Control CodeFile="recomendar.ascx.vb" Inherits="codigo"%> To
<%@ Control CodeFile="recomendar.ascx.vb" Inherits="rcomendar"%>
Volar
Member
24 Points
109 Posts
recognize a custom control
Jan 25, 2013 02:01 PM|LINK
Hi all:
I have a custom control
in the aspx page I do
<%@ Register Src="recomendar.ascx" TagPrefix="rec" TagName="recomendar" %>
In the control I have
<%@ Control CodeFile="recomendar.ascx.vb" Inherits="codigo"%>
And in the controls's codebehind
Partial Class codigo
Inherits System.Web.UI.UserControl
But it doesn't recognize the control in the aspx page. It tells me 'rec:recomendar is not a known control
Can u help me?
Thanks in advance
Volar
Member
24 Points
109 Posts
Re: recognize a custom control
Jan 25, 2013 02:11 PM|LINK
Hi again
The exact error is
Warning 14 Element 'recomendar' 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.
Any help would be appreciated
Angie xu - M...
All-Star
18655 Points
1590 Posts
Microsoft
Re: recognize a custom control
Jan 29, 2013 08:24 AM|LINK
Hi Volar
You could follow the reference below to create custom user control with a new project, and check whether it is ok.
Create a Custom User Control in ASP.NET
hope it helps you,
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
sukanta
Member
459 Points
130 Posts
Re: recognize a custom control
Jan 29, 2013 08:34 AM|LINK
inherits property must be same as that of the codefile that is "recomendar"
so change <%@ Control CodeFile="recomendar.ascx.vb" Inherits="codigo"%> To
<%@ Control CodeFile="recomendar.ascx.vb" Inherits="rcomendar"%>