Design support for templated UserControl

Posted by SaphuA on Stack Overflow See other posts from Stack Overflow or by SaphuA
Published on 2010-05-03T12:57:37Z Indexed on 2010/05/03 14:08 UTC
Read the original article Hit count: 293

Hello,

I have created a real simple templated UserControl using the following tutorial: http://msdn.microsoft.com/en-us/library/36574bf6(VS.80).aspx

I can now add this control to my mvc 2.0 application using:

<components:Box BoxType="Help" Title="Content Title" runat="server">
    <Content>
        <%: Html.TextBox("test") %>
        This is my awesome content!<br />
        <b>Test</b>
    </Content>
</components:Box>

However, when I go to the designer, I get an exception: Type 'System.Web.UI.UserControl' does not have a public property named 'Content'.

How can I fix this? I don't even need to use the drag-and-drop designer, just rendering the control will do fine.

Thanks!

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about usercontrol