ContentByQueryWebPart.WebUrl Property

Gets or sets the server-relative URL of the Web site.

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

Syntax

'Declaration
<ManagedLinkAttribute(Fixup := True)> _
<WebBrowsableAttribute(False)> _
<PersonalizableAttribute(PersonalizationScope.Shared)> _
Public Property WebUrl As String
    Get
    Set
'Usage
Dim instance As ContentByQueryWebPart
Dim value As String

value = instance.WebUrl

instance.WebUrl = value
[ManagedLinkAttribute(Fixup = true)]
[WebBrowsableAttribute(false)]
[PersonalizableAttribute(PersonalizationScope.Shared)]
public string WebUrl { 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.

See Also

Reference

ContentByQueryWebPart Class

ContentByQueryWebPart Members

Microsoft.SharePoint.Publishing.WebControls Namespace

ContentByQueryWebPart