Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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>
share|improve this question

3 Answers 3

up vote 4 down vote accepted

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

share|improve this answer
    
Thanks Kusek, I am new to user control development and deployment in MOSS 2007. The tutorial I mentioned in my question talks more about how to develop a user control, but less about deployment using master page method as you mention here. Appreciate if you could recommend me a step-by-step guide covering user control development and deployment cycle. Better with source codes. –  George2 Nov 15 '09 at 16:35
    
Cool, Kusek! Question answered! –  George2 Nov 16 '09 at 17:18

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.

share|improve this answer
    
Thanks Simon, I am new to user control development and deployment in MOSS 2007. The tutorial I mentioned in my question talks more about how to develop a user control, but less about deployment (this is why I am asking the question here). Appreciate if you could recommend me a step-by-step guide covering user control development and deployment cycle. Better with source codes. –  George2 Nov 15 '09 at 16:35
    
George, I dont have my dev environment to hand at the moment, but I look to post something tomorrow which will give you a bit more of an idea. Simon –  Anonymous Nov 16 '09 at 22:25

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.

share|improve this answer
    
Thanks Jaap, I am new to user control development and deployment in MOSS 2007. The tutorial I mentioned in my question talks more about how to develop a user control, but less about deployment (this is why I am asking the question here). Appreciate if you could recommend me a step-by-step guide covering user control development and deployment cycle. Better with source codes. –  George2 Nov 15 '09 at 16:35

Your Answer

 
discard

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.