我想在我的母版页中引用一个变量,但我收到错误。在内容页面访问MasterPage变量
我已经试过
<%@ MasterType" %>
它提供了以下错误:
Compiler Error Message: CS0030: Cannot convert type 'IPAMIntranet.IPAMIntranetMaster' to 'ASP.ipamintranetmaster_master'
和
string tVar = ((MyNamespace.MyMasterPage)Master).variable
它提供了以下错误:
Unable to cast object of type 'ASP.ipamintranetmaster_master' to type 'IPAMIntranet.IPAMIntranetMaster'.
有人知道发生了什么,或者我错过了什么。
我尝试了 <%@ MasterType VirtualPath =“〜/ IPAMIntranetMaster.Master”%> 我发现了这个错误。 – mattgcon 2010-04-21 20:42:16