MasterType directive is broke?

Discussion in 'ASP .Net' started by Andy B, Nov 16, 2007.

  1. Andy B

    Andy B Guest

    I have the following directive in my master page (the actual file name is
    Layout.master):
    <%@ MasterType VirtualPath="MasterPage.master" %>
    When I run the website, I get this error: "Parser Error Message: The file
    '/EternityRecords/MasterPage.master' does not exist."
    When i use Layout.master (the filename itself) as the virtual path, it tells
    me that circular references aren't allowed. If neither one of these work,
    then how does it? I can't find it in any help anywhere...
     
    Andy B, Nov 16, 2007
    #1
    1. Advertisements

  2. bruce barker

    bruce barker Guest

    the mastertype directive is for pages hosting the master page control,
    not the master page control itself (it knows its type). this directive
    generates a property for the page class like:

    MasterType Master
    {
    get {return (MasterType) base.Master;}
    }

    -- bruce (sqlwork.com)

    Andy B wrote:
    > I have the following directive in my master page (the actual file name is
    > Layout.master):
    > <%@ MasterType VirtualPath="MasterPage.master" %>
    > When I run the website, I get this error: "Parser Error Message: The file
    > '/EternityRecords/MasterPage.master' does not exist."
    > When i use Layout.master (the filename itself) as the virtual path, it tells
    > me that circular references aren't allowed. If neither one of these work,
    > then how does it? I can't find it in any help anywhere...
    >
    >
    >
     
    bruce barker, Nov 16, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DP
    Replies:
    0
    Views:
    1,369
  2. Troy
    Replies:
    2
    Views:
    564
    Troy Dedmon
    Jul 8, 2003
  3. andrea

    MasterType conflicts with Theme

    andrea, Feb 24, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    413
    andrea
    Feb 25, 2006
  4. ^MisterJingo^

    MasterType VirtualPath

    ^MisterJingo^, Dec 20, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,065
    bruce barker
    Dec 20, 2007
  5. rfcarter

    MasterType Directive Error

    rfcarter, Dec 6, 2008, in forum: ASP General
    Replies:
    2
    Views:
    307
    rfcarter
    Dec 8, 2008
Loading...