Pages

Monday, February 13, 2012

Delegate Controls: Small Search Input Box

Technorati's claim: UPC2AARRB5PC


I needed to customize the small search input box delegate control in my project.
The steps to do that are quite simple:
  1. add a new Empty SharePoint Project to your solution.
  2. add the ControlTemplate SharePoint mapped folder and add a new UserControlcontrols directory
    In these files you will write your custom view and logic
  3. modify the file Elements.xml
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        <Control  Id="SmallSearchInputBox"
            Sequence="25"
            ControlSrc ="~/_controltemplates/Piaggio.Dealer.Portal/SmallSearchInputBoxDelegateControl.ascx">
        </Control>
    </Elements>

    That’s mine. The Id attribute identify the Delegate Control that you want customize the Sequence is a number that identify the priority of your delegate. More this number is lower more the priority is high.

Deploy it and activate the feature. This is my result:

user control result

That’s all

No comments:

Post a Comment