ContentByQueryWebPart.ListName Property
Gets or sets the name of the list.
Namespace: Microsoft.SharePoint.Publishing.WebControls
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
<PersonalizableAttribute(PersonalizationScope.Shared)> _
<WebBrowsableAttribute(False)> _
Public Overrides Property ListName As String
Get
Set
'Usage
Dim instance As ContentByQueryWebPart
Dim value As String
value = instance.ListName
instance.ListName = value
[PersonalizableAttribute(PersonalizationScope.Shared)]
[WebBrowsableAttribute(false)]
public override string ListName { get; set; }
Property Value
Type: System.String
Remarks
The WebUrl property determines the ContentByQueryWebPart object's mode is determined by the WebUrl, ListGuid, and ListName properties.
If the WebUrl, ListGuid, and ListName properties are set, the mode is List.
If the WebUrl is set and ListGuid and ListName are empty, the mode is Web.
If WebUrl, ListGuid and ListName are empty, the mode is Site Collection.
If both ListGuid and ListName properties are set, ListGuid takes precedence.