Export (0) Print
Expand All

VariationDataSource class

NOTE: This API is now obsolete.

Represents the DataSource control that supplies data used to render the Variation Flag control.

System.Object
  System.Web.UI.Control
    System.Web.UI.HierarchicalDataSourceControl
      Microsoft.SharePoint.Publishing.WebControls.VariationDataSource

Namespace:  Microsoft.SharePoint.Publishing.WebControls
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

[ObsoleteAttribute("Use of this control is not recommended - use the Variations Client Side OM instead", 
	false)]
[MdsCompliantAttribute(IsCompliant = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class VariationDataSource : HierarchicalDataSourceControl, 
	IDataSource

The following properties are available for use in binding: Text, DisplayText, NavigateUrl,and ToolTip.

This example demonstrates how to connect an <asp:DataList> control to the VariationDataSource.

[asp]

<asp:DataList id="DataList1"
CellPadding="3"
Font-Size="8pt"
RepeatDirection="Horizontal"
runat="server"
DataSourceID="LabelMenuDataSource" >
<ItemTemplate>
<a href="<%# DataBinder.Eval(Container.DataItem, "NavigateUrl") %>">
<%# DataBinder.Eval(Container.DataItem, "DisplayText") %></a>
</ItemTemplate>
<SeparatorTemplate> | </SeparatorTemplate>
</asp:DataList>

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft