Question

I am using SharePoint 2007 Enterprise with Windows Server 2008. I am using VSTS 2008 + C# + .Net 3.5. I am new to SharePoint user control development and deployment. I am learning from,

http://www.codeproject.com/KB/sharepoint/PageFooter.aspx

But confused about the following deployment steps, my question is in what files do I need to modify to insert the following code segments?

Register your control:

<%@ Register TagPrefix="Flygare" 
    TagName="PageFooter" src="~/_controltemplates/PageFooter.ascx" %>

Insert your control:

<Flygare:PageFooter id="PageFoot" runat="server" enableviewstate="true">
</Flygare:PageFooter>
Was it helpful?

Solution

Master Page is where you need to place these items, because it defines the look and feel that all the pages in the site gets and by placing that you will have the changes reflected in all the pages of the site.

Register Tag has to be placed at the top of the Master page where you see other register tags. And the second set of code needs to be in the bottom of that page.

You can use the SharePoint designer

OTHER TIPS

in addition to Jaap's comment it is a good idea to put the control template in a sub directory underneath the 12 hive\TEMPLATE\ControlTemplates\yoursolutiondirectory. This way you or others (if you leave the organisation) will know that the control template is not part of the default installation.

You'll need to update the Register directive TagName property to point to the subdirectory.

in addition to Kusek's notes, ensure that you actually have your ascx file sitting in your controltemplates folder (in 12 hive) at the path that is referenced with your Register directive.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top