Accessing MasterPage variable in content page

Posted by mattgcon on Stack Overflow See other posts from Stack Overflow or by mattgcon
Published on 2010-04-21T20:31:57Z Indexed on 2010/04/21 20:33 UTC
Read the original article Hit count: 324

Filed under:
|
|

I am trying to reference a variable within my MasterPage but I am receiving errors.

I have tried

<%@ MasterType" %>:

 which gives the following error:
 `Compiler Error Message: CS0030: Cannot convert type 'IPAMIntranet.IPAMIntranetMaster' to 'ASP.ipamintranetmaster_master'

and "string tVar = ((MyNamespace.MyMasterPage)Master).variable"

 which gives the following error:
 `Unable to cast object of type 'ASP.ipamintranetmaster_master' to type 'IPAMIntranet.IPAMIntranetMaster'.`

Does anyone know what is happening or am I missing something.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about masterpage