none
Visual Studio 2013 - does not recognize asp tag in website project? ...

    Question

  • Hello,

    I inherited a web site that uses user controls to set the pages beginning and end tags in all *.aspx pages.

    Below is the typical structe of an .aspx page:

    <!DOCTYPE html>
    <%@ Page Language="VB" WarningLevel="1" Explicit="true" Strict="true" %>
    
    <%@ Register TagPrefix="pt" TagName="page_beg" src="/inc/pt_page_beg_1.ascx" %>
    <%@ Register TagPrefix="pt" TagName="page_end" src="/inc/pt_page_end_1.ascx" %>
    
    <pt:page_beg id="page_beg" title="Welcome" runat="server" />
    
    <div>
     Other markup for main body goes here
     <asp:Literal id="lit_1" text="Some Text" runat="server"/>
    </div>
    
    <pt:page_end runat="server" />

    The user control "page_beg" outputs an <html lang="xx"> tag where xx is a selected language / culture, along with
    the head, title and body tags in addition to other tags depending on various properties set in the control.

    The user control "page_end" simply writes out the footer of the page along with the body end and html end tags.


    Now, when I load any .aspx page in Visual Studio, all of the <asp tags are underlined and when I hover the popup text displayed is:

    "Unrecognized tag prefix or device filter 'asp'."

    If I enter a body tag near the top of the page the error disappears (but obviously, I cannot leave a stray body tag in the page).

    My question is how do I get Visual Studio to recognize the asp tags in this type of scenario?

    Friday, October 31, 2014 7:16 PM

Answers