开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜