SPList.DefaultDisplayFormUrl Property
Gets or sets the URL to the default form for displaying list items.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.Custom, FixedId := "a", Value := "Client MUST set a server-relative URL and the server MUST return a site-relative URL.")> _
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.NotEmpty)> _
<ClientCallableAttribute> _
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.NotNull)> _
Public Property DefaultDisplayFormUrl As String
Get
Set
'Usage
Dim instance As SPList
Dim value As String
value = instance.DefaultDisplayFormUrl
instance.DefaultDisplayFormUrl = value
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.Custom, FixedId = "a", Value = "Client MUST set a server-relative URL and the server MUST return a site-relative URL.")]
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotEmpty)]
[ClientCallableAttribute]
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotNull)]
public string DefaultDisplayFormUrl { get; set; }
Property Value
Type: System.String
When you set the property, use the value of the ServerRelativeUrl property of an SPForm object that is in the collection returned by the Forms property of the list. When you get the property, the string that is returned is the value of the Url property of the SPForm object, which is a server-relative URL.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The value set in the property is a null reference (Nothing in Visual Basic). |
SPException | The form cannot be set. Either the new form does not exist or the list does not support the form. |