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

Regarding my question, I have an OOTB control called ProjectProperty, which i can call in sharepoint like that:

<SharePoint:ProjectProperty Property="Title" runat="server" />

I want to extend this control. So i created a class which derives from this control:

 public class SiteProperty : ProjectProperty

And i added some functionality in this class.

My question now is, how can I use this extended customcontrol in the MasterPage. Where or how do I say that ok this is CustomControl and it should be used?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Register your solution/project assembly in the masterpage and/or pagelayouts like so:

<%@ Register TagPrefix="<Prefix>" Namespace="<NameSpace>" Assembly="<Assembly>" %>

Example:

<%@ Register TagPrefix="DandroidControl" Namespace="Dandroid.SharePoint.Controls" Assembly="Dandroid.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31ffcf8d61f9c2fb" %>
share|improve this answer
    
thank you very much! –  Shkipper Jul 18 '12 at 11:46

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.