P
Pipo
The problem:
I create a very simple custom control:
public class cLabel : System.Web.UI.WebControls.Label { }
I place the cLabel in a user control.
When I place the user control on a page I get this exception:
Error Rendering Control - cLabel
An unhandled exception has occurred.
Unknown server tag 'cc1:cLabel'.
So I tried to make a custom control which inherits from webcontrol:
I create a very simple custom control:
Designer(typeof(ControlDesigners))
public class cELabel : WebControl { }
And make a very simple designer for it.
public class ControlDesigners : System.Web.UI.Design.ControlDesigner
{
public override string GetDesignTimeHtml()
{ StringWriter sw = new StringWriter();
HtmlTextWriter tw = new HtmlTextWriter(sw);
cLabel lbl = new cLabel();
lbl.Text = "cLabel";
lbl.RenderControl(sw);
return sw.ToString();
}
}
Now everything works fine within the user control.
But when I place the cELabel into a panel in the user control I get the same
damn error.
I really need to get this working!
Anyone know the 'bug'?
Is there a solution?
I am working with VS2005 (beta), can someone confirm this works in the final
release?
Tia!
I create a very simple custom control:
public class cLabel : System.Web.UI.WebControls.Label { }
I place the cLabel in a user control.
When I place the user control on a page I get this exception:
Error Rendering Control - cLabel
An unhandled exception has occurred.
Unknown server tag 'cc1:cLabel'.
So I tried to make a custom control which inherits from webcontrol:
I create a very simple custom control:
Designer(typeof(ControlDesigners))
public class cELabel : WebControl { }
And make a very simple designer for it.
public class ControlDesigners : System.Web.UI.Design.ControlDesigner
{
public override string GetDesignTimeHtml()
{ StringWriter sw = new StringWriter();
HtmlTextWriter tw = new HtmlTextWriter(sw);
cLabel lbl = new cLabel();
lbl.Text = "cLabel";
lbl.RenderControl(sw);
return sw.ToString();
}
}
Now everything works fine within the user control.
But when I place the cELabel into a panel in the user control I get the same
damn error.
I really need to get this working!
Anyone know the 'bug'?
Is there a solution?
I am working with VS2005 (beta), can someone confirm this works in the final
release?
Tia!