Hi,
Thanks for your response. This is Namespace issue. If the classes are in the same Namespace, we don't need to use full qualifier to refer it.
I cannot repro the issue. The following is my test code:
MasterPages_default.Master.cs:
namespace Company.Web.UI
{
public partial class MasterPages_default : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
MasterPages_default.Master.designer.cs:
namespace Company.Web.UI {
public partial class MasterPages_default {
/// <summary>
/// head control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder head;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ContentPlaceHolder1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1;
}
}
MyWebPage.aspx.cs:
namespace Company.Web.UI
{
public partial class MyWebPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
MyWebPage.aspx.designer.cs:
namespace Company.Web.UI
{
public partial class MyWebPage
{
public new Company.Web.UI.MasterPages_default Master
{
get
{
return ((Company.Web.UI.MasterPages_default)(base.Master));
}
}
}
}
If this cannot help you, please post the code just like me.
I look forward to hearing from you.