[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SharePoint 2010 User Controls

Posted on 2010-11-22
1
Medium Priority
?
1,220 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 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 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