osiris247
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i have emailed him and wait to see.
o