locked
tagprefix is not working RRS feed

  • Question

  • User-208772033 posted

     hai

    i m new to vb.net and my problem is......

    i created a class file in app_code/controls  named TemplatedContent.vb

    the class file is like this

    Namespace Legato.Controls
        <Designer(GetType(TemplatedContentDesigner)), ToolboxData("<{0}:TemplatedPanel runat=server></{0}:TemplatedPanel>")> Public Class TemplatedContent

     Inherits WebControl

    Public Sub New()
            End Sub
     

    .................................

    .................................

    end class

    end namespace

    it does not show any errors

    then i created a masterpage site.master

    <%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %>
    <%@ Register  TagPrefix ="cc1" Namespace ="Legato.Controls"  %>
    <!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 runat="server">
        <title></title>
    </head>
    <body runat ="server" id="body">
        <form id="form1" runat="server">
         <cc1:TemplatedContent runat="server" ID="pnlTop" SkinID="Top"></cc1:TemplatedContent>
                <asp:ContentPlaceHolder ID="mainContent" runat="server"></asp:ContentPlaceHolder>
            <cc1:TemplatedContent runat="server" ID="pnlBottom" SkinID="Bottom"></cc1:TemplatedContent>
        </form>
    </body>
    </html>

     

    but i m getting warning in the line   <cc1:TemplatedContent runat="server" ID="pnlTop" SkinID="Top"></cc1:TemplatedContent> as 'element TemplatedContent is not a known element or web.config file is missing'

    i add control in web.config file also but still i got that message,i checked the class diagram but there also TemplatedContent is showing as method and no problem is there also

    please help me in urgent 

    thanks in advance.................

     

    Monday, December 8, 2008 9:28 AM

Answers

  • User-990694832 posted

    Add Src="your location "   to the register tag

    Hope this helps

    DK

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 8, 2008 1:08 PM