Mahes
Mahes

Reputation: 4135

Asp.net UserControl with Templates is not working inside user controls

I have created a real simple templated UserControl and

I can now add this control to my Asp.net WebApplication using:

<components:Box BoxType="Help" Title="Content Title" runat="server">
    <Content>
        <asp:TextBox runat="Server" ID="txtName"/>
        This is my awesome content!<br />
        <b>Test</b>
    </Content>
</components:Box>

i can embed this in a page (aspx) but i is not working in usercontrol (ascx). when i use this inside usercontrol, the designer file (.ascx.designer.cs) itself not getting generated.

getting the following error:

Element 'Box' is not a known element. This can occur if there is an error in the webpage, or the web.config file is missing.

Update: sometimes it works! i created couple of controls. it works in some place and it doesnot works in someother place.

Thanks!

Upvotes: 1

Views: 522

Answers (1)

Related Questions