Latest web development tutorials

WebSecurity GetCreateDate method

WebSecurity objects WebSecurity objects

Definition and Usage

GetCreateDate () method returns the specified date and time member account created.

C # and VB syntax

WebSecurity.GetCreateDate( userName )


parameter

参数 类型 描述
userName String 用户名


return value

类型 描述
DateTime 会员帐户创建的日期和时间


Errors and exceptions

In the following scenario, any access to WebSecurity object will throw an InvalidOperationException:

  • InitializeDatabaseConnection () method has not been called
  • SimpleMembership not initialized (or disabled in the site configuration)

If the account creation date is invalid, GetCreatedDate () method returns DateTime.MinValue.

DateTime.MinValue value is 00: 00: 00.0000000, January 1, 0001.


Technical data

名称
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll


WebSecurity objects WebSecurity objects