I need to inherit the asp.net Treeview for fixing a rendering issue. I am currently trying to accomplish that in an Sharepoint project that also contains various other things like webparts, aspx, images, etc.
I tried to do it like this the first time:
namespace MyNamespace.Controls
{
[ToolboxData("<{0}:TreeViewAdv runat=server>")]
public class TreeViewAdv : TreeView
{
public override void RenderBeginTag(HtmlTextWriter writer)
{
base.RenderBeginTag(writer);
if (base.DesignMode)
{
writer.RenderBeginTag(HtmlTextWriterTag.Tr);
writer.RenderBeginTag(HtmlTextWriterTag.Td);
}
}
}
}
When I now try to use that control in an aspx inside that assembly, I am not able to reference the control with a statement like this:
"<%@ Register TagPrefix="custom" Namespace="MyNamespace.Controls" %>"
The question is: Is this supposed to work? Do I really have to create a second assembly for that only hosting server controls (hope not)?
Every hint is highly appreciated.
Thanks
Holger