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. Advertising

  2. Andy B

    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. Advertising

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,203
  2. Troy
    Replies:
    2
    Views:
    464
    Troy Dedmon
    Jul 8, 2003
  3. andrea

    MasterType conflicts with Theme

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

    MasterType VirtualPath

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

    MasterType Directive Error

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

Share This Page