Solved

SharePoint 2010 User Controls

Posted on 2010-11-22
1
1,167 Views
Last Modified: 2012-06-27
I've created several user controls (.ascx files).  I then created a CUSTOM folder at this location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\

 I placed the User Controls in the CUSTOM folder.  I am trying to reference the controls from my Master Page like this:

<%@ Register TagPrefix="uc" TagName="HeaderControl" src="/_controltemplates/CUSTOM/Header.ascx" %>

I am using SharePoint Designer to modify the Master Page.  It says it cannot find the files referenced.  I have restarted the Site and restarted IIS.  Not sure why it isnt found.  

Thanks for any help provided....
0
Comment
Question by:obautista
1 Comment
 
LVL 3

Accepted Solution

by:
Nomoho earned 500 total points
ID: 34202005
Hello,

I have noticed you forgot the ~ symbol in your register:

<%@ Register TagPrefix="uc" TagName="HeaderControl" src="~/_controltemplates/CUSTOM/Header.ascx" %>

I have created several user controls registered in my master page by using this src url: "~/_controltemplates/CustomUserControl.ascx" (but without the folder)

Does it work if you move and register your ascx file in the control template folder?
Of course you must execute a IISRESET for the user control to be seen by sharepoint.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now