dyarosh
asked on
The type name 'CVL' does not exist in the type 'CVL.CVL Error
I am trying to access a public method in my Master Page from my child pages. Here is the basic layout that I have:
I get the above error in the CVLLookup.aspx.designer.cs file which is autogenerated. Here is what is generated in the designer file:
public new CVL.CVL Master {
get {
return ((CVL.CVL)(base.Master));
}
}
The error occurs on the second reference to CVL.CVL in both places. See attached file.
Any help is greatly appreciated!
CVLError.bmp
CVL.Master - Master page
CVL.Master.cs
============
namespace CVL
{
public partial class CVL : System.Web.UI.MasterPage
{
public void ErrorHandling(parameter definitions)
{
error handling code
}
}
}
CVLLookup.aspx - Web page using CVL.Master as it's Master Page
CVLLookup.aspx.cs
===============
namespace CVL
{
public partial class CVLLookup : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs, e)
{
CVL pm = (CVL)Page.Master;
pm.ErrorHandling(parameters);
}
}
}
I get the above error in the CVLLookup.aspx.designer.cs
public new CVL.CVL Master {
get {
return ((CVL.CVL)(base.Master));
}
}
The error occurs on the second reference to CVL.CVL in both places. See attached file.
Any help is greatly appreciated!
CVLError.bmp
ASKER
I am using VS2010 and the .designer file is auto-generated. I did not create this definition explicitly. It was done by VS2010 for me so I can't make any changes to it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found the problem on my own.
Open in new window
Out of curiosity, why are you using new?