Top link bar sub-site drop-down list in SharePoint Foundation 2010

You could use this method to custom your drop-down list top link bar in SharePoint 2010,Easy and Simple SharePoint 2010 Dropdown Navigation bar that works no scripts, no web.config, works on hosted providers.

sharepoint2010 dropdown list top link bar

Here is my code in a custom Master.page I used SharePoint Designer to set the DataSourceID=SiteMapDataSource1 – in the GUI click the TopMenuNav bar click the top-right > arrow and then “New Data Source” use the default name.

Code should look like this. I also changed the SPSiteMapProvider under
SiteMapProvider in both ID= under AspMenu and SiteMapProvider under
aspSiteMapDataSource.

<SharePoint:AspMenu
ID="SPSiteMapProvider"
Runat="server"
EnableViewState="false"
DataSourceID="SiteMapDataSource1"
UseSimpleRendering="true"
UseSeparateCss="false"
Orientation="Horizontal"
StaticDisplayLevels="2"
MaximumDynamicDisplayLevels="4"
SkipLinkText=""
CssClass="s4-tn"/>
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1" />
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
<Template_Controls>
<asp:SiteMapDataSource
ShowStartingNode="True"
SiteMapProvider="SPSiteMapProvider"
id="topSiteMap"
runat="server"
StartingNodeUrl="sid:1002"/>
</Template_Controls>
</SharePoint:DelegateControl>







Then you will find your sharepoint site’s top link bar like this:



sharepoint2010 dropdown list top link bar



I think Microsoft they should add this feature by default.