共用方式為


SPList.DefaultNewFormUrl property

取得或設定來建立新的清單項目的預設表單的 URL。

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

Syntax

'宣告
Public Property DefaultNewFormUrl As String
    Get
    Set
'用途
Dim instance As SPList
Dim value As String

value = instance.DefaultNewFormUrl

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

Property value

Type: System.String
當您設定屬性時,使用清單的Forms屬性所傳回集合中的SPForm物件ServerRelativeUrl屬性的值。當您取得的屬性時,傳回的字串是SPForm物件,這是 Web 相對 URL 的Url屬性的值。

Exceptions

Exception Condition
ArgumentNullException

屬性中所設定的值是a null reference (Nothing in Visual Basic)。

SPException

無法設定表單。新的表單不存在或清單不支援表單。

請參閱

參照

SPList class

SPList members

Microsoft.SharePoint namespace