Try our conversational search powered by Generative AI!

Registering a server control that inherits PageList



I'm trying to do the relatively simple task of registering a server control, and I'm having a few problems that I hope you guys can help me with!

I'm using this guide:

To build and use the control that's provided for me.

I've followed the guide to the letter, but Visual Studio isn't recognising the new control.

The guide-writer doesn't tell you where to put the web control class, so I put it in a random directory and referenced the namespace and assembly as the guide tells me to.

I've also tried compiling the control into a DLL and referencing it in Visual studio. This also fails.

Is the guide missing something elementary that I am perhaps expected to know that's involved in registering and using a server control?

Thanks for any help,


Jun 25, 2009 10:43

Hi Karl! 

Compiling the code into a DLL and then place it in the /bin folder of your EPiServer installation should do the trick.


Jun 25, 2009 11:05

Hi Johan,

Thanks very much for such a prompt response, it's very much appreciated!

Unfortunately, that's exactly where I put my newly compiled DLL, but my control is still not recognised.

I've added it to my visual studio references, and I'm referencing it directly within the page with the following line:

 <%@ Register TagPrefix="yucca" TagName="PageList" Namespace="Antecknat.Web.WebControls" Assembly="Antecknat" %>

 I'm then referencing the control with:

 <yucca:PageList ID="PageList1" runat="server> </yucca:PageList>

This is still not working. :(

Do you have any further thoughts? 

Jun 25, 2009 11:28

Hi, leave the TagName out when registering:

<%@ Register TagPrefix="yucca" Namespace="Antecknat.Web.WebControls" Assembly="Antecknat" %>

And, is the resulting assembly named "Antecknat.dll"?
Also make sure that the class PageList really exists in the namespace Antecknat,Web.WebControls.

If all above is correct, it *should* work.


Jun 25, 2009 11:32

The DLL being produced was something else, so I changed the assembly tag to what it was producing, dropped the TagName property, and hallelujah, it works!

 Thanks very much Johan, you are officially ace!  :D

Jun 25, 2009 11:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.