@MasterType的文档中有以下示例。
为什么需要
<%@ Page masterPageFile="~/MasterPage.master"%>
<%@ MasterType virtualPath="~/MasterPage.master"%>
为什么需要
@MasterType
?难道编译器不能只根据@Page masterPageFile
自动采取相同的操作吗?什么情况下不需要同时使用它们两个?