Solved

SharePoint 2010 User Controls

Posted on 2010-11-22
1
1,202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint display modal blank 2 63
Use SP.SOD.executeFunc in SharePoint Online Add-In 2 96
SP2010 Parent Child Relationship 3 48
SharePoint Explorer Folder Access 4 61
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…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

740 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