2

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>

3 Answers 3

4

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

2
  • 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, 2009 at 16:35
  • Cool, Kusek! Question answered!
    – George2
    Nov 16, 2009 at 17:18
3

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.

2
  • 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, 2009 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, 2009 at 22:25
2

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.

1
  • 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, 2009 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.