This topic has not yet been rated - Rate this topic

VariationDataSource Class

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)
[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.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ