Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SimpleMembershipProvider.DeleteAccount Method

Deletes the specified membership account.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

public override bool DeleteAccount(
	string userName
)

Parameters

userName
Type: System.String
The user name.

Return Value

Type: System.Boolean
true if the user account was deleted; otherwise, false.

ExceptionCondition
ArgumentException

username is null or empty.

InvalidOperationException

The SimpleMembershipProvider class was not initialized using a call to the InitializeDatabaseConnection() method.

This method deletes the entry in the membership account table (by default, webpages_Membership). It does not delete user profile data that is associated with the account.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show:
© 2015 Microsoft