Newbie - 2 classes in the same namespace problem

  • Thread starter Thread starter Jarma
  • Start date Start date
J

Jarma

I'm new to VS2005, but have experience with previous versions.
I created web site with a page and a web user control inserted in it.
Their classes are in the same namespace.

Here's the code fragment:

namespace NmSp
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}


namespace NmSp
{
public partial class wuc : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
NmSp.Test t = (NmSp.Test)Page; // <------
}
}
}

Why do I get compile time error that Test does not exitst in namespace NmSp?

Wojtek
 
Back
Top