Link to home
Start Free TrialLog in
Avatar of osiris247
osiris247Flag for United States of America

asked on

Unable to cast object of type 'ASP.masterpage_master' to type 'MasterPage'.

Morning....

I get this error every now and again.  It seems to be mainly when i change something on a usercontrol which is on the master page.

I get this error on this line of code trying to access a property on the master page, which then changes another property on the user control.

default.aspx
Master.PageTitle = "View - Summary";

Master page
public string PageTitle
    {
        get { return Header1.PageTitle; }
        set { Header1.PageTitle = value; }
    }

user control
public string PageTitle
    {
        get { return lblPageTitle.Text; }
        set { lblPageTitle.Text = value; }
    }

the only way i can stop this error is to close VS 2005 and open project again.

any ideas??

thanks
o
ASKER CERTIFIED SOLUTION
Avatar of enwhysee
enwhysee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of osiris247

ASKER

thanks enwhysee...

i have emailed him and wait to see.

o