I am trying to create a custom quick launch by overriding the Delegate control on the master page but I am not having an luck. I create an Elements.xml file and am deploying it in a custom feature.

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
    Id="QuickLaunchDataSource"
    Sequence="10"
    ControlSrc="/_controltemplates/CustomQuickLaunch.ascx">
    <Property Name="SiteMapProvider">CustomQuickLaunchProvider</Property>
    <Property Name="EnableViewState">true</Property>
    <Property Name="ShowStartingNode">false</Property>
    <Property Name="ID">QuickLaunchSiteMap</Property>
  </Control>
</Elements>

Inside my User Control I have this

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomQuickLaunch.ascx.cs" Inherits="AdventureWorks.CustomLists.CONTROLTEMPLATES.CustomQuickLaunch" %>
<h1>Hello Quick Launch!</h1>

Unfortunately when I deploy I get this error.

"The DataSourceID of 'V4QuickLaunchMenu' must be the ID of a control of type IHierarchicalDataSource. 'QuickLaunchSiteMap' is not an IHierarchicalDataSource."

I have even changed the XmlDataSource safecontrol tage to Safe="True"

<SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="XmlDataSource" Safe="True" AllowRemoteDesigner="False" SafeAgainstScript="True" />

I am clearly doing something wrong, any help?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.