Partilhar via


SPUserCustomAction.Url Property

Gets or sets the action that will be taken when the custom action is fired.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallablePropertyAttribute> _
<ClientCallableConstraintAttribute(FixedId := "validUrlorNull", Type := ClientCallableConstraintType.Custom,  _
    Value := "It MUST be NULL or a server-relative url.")> _
Public Overridable Property Url As String
    Get
    Set
'Usage
Dim instance As SPUserCustomAction
Dim value As String

value = instance.Url

instance.Url = value
[ClientCallablePropertyAttribute]
[ClientCallableConstraintAttribute(FixedId = "validUrlorNull", Type = ClientCallableConstraintType.Custom, 
    Value = "It MUST be NULL or a server-relative url.")]
public virtual string Url { get; set; }

Property Value

Type: System.String
Returns a String that contains the custom action’s action. Note that any tokens contained in this action will not be resolved.

Remarks

This value can be a URL, an ECMAScript (JScript, JavaScript) function, or some other URI such as mailto. Any tokens will be resolved based on the table below prior to displaying the action in a browser:

Token

Replacement Value

~site

The server-relative URL to the site (ServerRelativeUrl).

~sitecollection

The server-relative URL of the site collection (ServerRelativeUrl).

{ItemId}

The item ID chosen in the list view.

{ItemUrl}

The Web site-relative URL of the list item (Url).

{SiteUrl}

The fully qualified URL to the site (Url).

{ListId}

The ID of the list (ID).

{ListUrlDir}

The server-relative URL of the site plus the list's folder.

{Source}

The fully qualified URL of the request URL.

{RecurrenceId}

The recurrence ID of the list item (RecurrenceID).

See Also

Reference

SPUserCustomAction Class

SPUserCustomAction Members

Microsoft.SharePoint Namespace