Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
<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
[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, href,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, "href") %>">
<%# 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.