SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to register controls, aside from:

<%@ Register Tagprefix="CustomSearch" Namespace="SomeAssembly.WebControls" 
   Assembly="SomeAssembly.WebControls, Version=, Culture=neutral, 
   PublicKeyToken=71e9bce111e9429c" %>

within the web.config file, like you can with a normal ASP.Net web site? I tried this, but SharePoint keeps complaining that it cannot find the control?

share|improve this question
Are you trying to register some user control? – V.B May 2 '12 at 8:08

If you are trying to register a variety of User Controls, you cannot do it that way. A user control requires that you reference it's .ascx file in order to use it, like this:

<%@ Register Tagprefix="CustomSearch" Tagname="SearchBox" src="~/_controltemplates/customsearch/searchbox.ascx" %>

The above allow the use of this: <CustomSearch:SearchBox ID="SearchBox1" runat="server" />

Whereas in your provided example, that registers controls, which also will allow the use of the above example, but the difference being that the controls don't have "visual" files like .ascx or .aspx.

share|improve this answer
in my example these are server controls compiled in assemblies. I'm well familiar with this in but for some reason, SharePoint does not like it? – JadedEric May 10 '12 at 13:18
@JadedEric Are you sure that the assembly is indeed in the GAC and that it is the correct assembly information that you type in the <%@ Register %>? – Daniel Ziga May 10 '12 at 13:30
i did, check on several times even recompiled and resubmitted the assemblies to the GAC. it's very weird. will play around again to see if can get around it. thanks. – JadedEric May 10 '12 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.