Why is @MasterType directive not implied when setting @Page masterPageFIle?
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开发者_StackOverflow
? When would you not want to use both?
You can set different master pages at each pages PreInit. So the master page is in general not well defined.
精彩评论