다음을 통해 공유


AssetUrlSelector.DefaultOpenLocationUrl Property

Gets or sets the URL to a location in this site collection to add to the top of the Look In section of the Asset Picker dialog box.

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

Syntax

'Declaration
Public Property DefaultOpenLocationUrl As String
    Get
    Set
'Usage
Dim instance As AssetUrlSelector
Dim value As String

value = instance.DefaultOpenLocationUrl

instance.DefaultOpenLocationUrl = value
public string DefaultOpenLocationUrl { get; set; }

Property Value

Type: System.String
Defaults to an empty string.

Remarks

This URL should begin with either "~SiteCollection/" or "~Site/" followed by the URL relative to the desired SharePoint site location. If this URL refers to a valid SharePoint location and one of the authoring users has permission to access it, it is displayed in the Look In section on the left side of the Asset Picker dialog box.

When DisplayLookInSection and DefaultToLastUsedLocation are both set to false, the DefaultOpenLocationUrl property has a valid location, and there is no current AssetUrl property, the Asset Picker dialog box opens in this location and does not display any other locations on its left side. This behavior encourages the user to select a URL from the provided location.

Examples

// These values control the appearance and behavior
// of the Asset Picker dialog box.
private const string SampleDefaultOpenLocationUrl = "~Site/Pages/";

// Set values for the appearance and behavior of the Asset Picker dialog box.
   assetSelector.DefaultOpenLocationUrl = SampleDefaultOpenLocationUrl;
' These values control the appearance and behavior
' of the Asset Picker dialog box.
Private Const SampleDefaultOpenLocationUrl As String = "~Site/Pages/"

' Set values for the appearance and behavior of the Asset Picker dialog box.
   assetSelector.DefaultOpenLocationUrl = SampleDefaultOpenLocationUrl

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

AssetUrlSelector