Share via


VariationDataSource class

NOTE: This API is now obsolete.

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

Inheritance hierarchy

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)

Syntax

'Declaration
<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 NotInheritable Class VariationDataSource _
    Inherits HierarchicalDataSourceControl _
    Implements IDataSource
'Usage
Dim instance As VariationDataSource
[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

Remarks

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

Examples

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>

Thread safety

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

See also

Reference

VariationDataSource members

Microsoft.SharePoint.Publishing.WebControls namespace