다음을 통해 공유


AssetUrlSelector.AssetUrl Property

Gets or sets the URL that the user has typed or selected and enters it in the Asset URL text box.

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

Syntax

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

value = instance.AssetUrl

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

Property Value

Type: System.String
An empty string (the default).

Remarks

The AssetUrl value is validated or the URL decoded on postback if appropriate control properties are set. This property does not contain the selected URL on postback if the AssetUrlTextBoxVisible property is set to false.

Examples

       // This must be ECMAScript returning a string   // value for asset URL data.
private const string ScriptGetAssetUrlValue = "window.location.href";

// Sets an event handler for when the AssetUrl value changes on a postback.assetSelector.AssetUrlChanged += 
delegate(object sender, System.EventArgs ev)
{ string newAssetUrlValue = ((AssetUrlSelector)sender).AssetUrl;
// Perform event handling operations based on the newAssetUrlValue. 
};
' This must be ECMAScript returning a string
' value for asset URL data.
Private Const ScriptGetAssetUrlValue As String = "window.location.href"

' Sets an event handler for when the AssetUrl value changes on a postback.
AddHandler assetSelector.AssetUrlChanged, Sub(sender As Object, ev As System.EventArgs)  Dim newAssetUrlValue As String = (CType(sender, AssetUrlSelector)).AssetUrl  'Perform event handling operations based on the newAssetUrlValue. 
  End Sub

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

ValidateUrl

DecodeUrlPath

AssetUrlSelector