WebSecurity - GetCreateDate()
WebSecurity Object
Definition and Usage
GetCreateDate()The method returns the date and time when the specified member account was created.
C# and VB Syntax
WebSecurity.GetCreateDate(userName)
Parameters
| Parameter | Type | Description |
|---|---|---|
| userName | String | Username |
Return Value
| Type | Description |
|---|---|
| DateTime | The date and time when the member account was created |
Errors and Exceptions
In the following cases, any access to theWebSecurityobject will throw anInvalidOperationException:
- InitializeDatabaseConnection()method has not been called
- SimpleMembershipnot initialized (or disabled in website configuration)
If the account creation date is invalid, theGetCreatedDate()method returnsDateTime.MinValue。
DateTime.MinValue whose value is 00:00:00.0000000, January 1, 0001.
Technical Data
| Name | Value |
|---|---|
| Namespace | WebMatrix.WebData |
| Assembly | WebMatrix.WebData.dll |
WebSecurity Object Other Extensions