共用方式為


DateTimeControl Class

Represents a DateTime control.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    Microsoft.SharePoint.WebControls.SPCompositeControl
      Microsoft.SharePoint.WebControls.DateTimeControl

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class DateTimeControl _
    Inherits SPCompositeControl _
    Implements IValidator, IPostBackDataHandler, IDesignerEventAccessor
'Usage
Dim instance As DateTimeControl
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class DateTimeControl : SPCompositeControl, 
    IValidator, IPostBackDataHandler, IDesignerEventAccessor

Remarks

Important

In order for the DateTimeControl to render properly, the EnableViewState property must be set to true.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

DateTimeControl Members

Microsoft.SharePoint.WebControls Namespace