I have the following control:
public partial class Controls_ProductPanel : System.Web.UI.UserControl
{
private int _ProductID;
public int ProductID
{
get
{
return _ProductID;
}
set
{
_ProductID = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
I want be be able to add it to a page like this:
Controls_ProductPanel panel = new Controls_ProductPanel();
panel.ProductID = 2;
Page.Controls.Add(panel);
But Visual Studio doesn't seem to reconise Controls_ProductPanel
I get:
The type or namespace name 'Controls_ProductPanel' could not be found. (Are you missing a using directive or an assembly reference?)