Share via


URL Element (View)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Renders the URL of a particular form for a specified list.

<URL
  Cmd = "Text"
  NoID = "TRUE" | "FALSE">
</URL>

Attributes

Attribute

Description

Cmd

Optional Text. Specifies the display mode appropriate for the form. Can be one of the following values for DisplayMode: Display, DisplayHead, Edit, New, PreviewDisplay, PreviewEdit, PreviewNew. This attribute can also be set to LookUp, which is used during field rendering to return the display form in the foreign list for a lookup field.

NoID

Optional Boolean. TRUE to return the URL of the item form without including the item ID as part of the URL.

Child Elements

None

Parent Elements

Numerous

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

Because links returned by this element are absolute URLs and already encoded, there is no need to use the URLEncodeAsURL attribute to encode the URL (see Global Attributes for HTML-Rendering Elements).

The following examples show the URLs returned by using the URL element on an Announcements list:

  • <URL Cmd="EDIT"/> renders "http://Server_Name/Site_Name/Lists/Announcements/EditForm.aspx"

  • <URL Cmd="NEW"/> renders "http://Server_Name/Site_Name/Lists/Announcements/NewForm.aspx"

  • <URL Cmd="DISPLAY"/> renders "http://Server_Name/Site_Name/Lists/Announcements/DispForm.aspx"

See Also

Reference

UrlBaseName Element (View)

UrlDirName Element (View)