MasterType directive is broke?

A

Andy B

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

bruce barker

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)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top