Reputation: 74949
The docs for @MasterType have this example.
<%@ Page masterPageFile="~/MasterPage.master"%>
<%@ MasterType virtualPath="~/MasterPage.master"%>
Why is @MasterType
even needed? Couldn't the compiler automatically take the same actions based solely on @Page masterPageFile
? When would you not want to use both?
Upvotes: 8
Views: 1345
Reputation: 5072
You can set different master pages at each pages PreInit. So the master page is in general not well defined.
Upvotes: 2