Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
A user can always work with her own data. For other accounts the caller must have the GlobalGroupAdmin user right.
All property an application names are case sensitive.
[This is preliminary documentation and is subject to change.]
Deletes a custom Content Studio User property.
Namespace: ContentStudio.Security
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public void DeleteProperty( ConnectionId connectionId, SessionId sessionId, string identifier, TrusteeUserIdentifiers idType, string propertyName )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - identifier
- Type: SystemString
An identifier to a user. - idType
- Type: ContentStudio.SecurityTrusteeUserIdentifiers
The type of identifier entered in the Identifier parameter. - propertyName
- Type: SystemString
The name of the property to delete. The property must have the form Application.Property. If you try to delete properties of the system application or if propertyName does not exist an exception is thrown.
Exceptions
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database.
The following numbered exceptions are common:
|
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
Examples
The following code shows how to delete a property named Data1 in the application MyApp for the calling user. Since DeleteProperty generates an error when called on a non-existing property this code sample first examines whether the property exists or not before deleting it.
try { UserProperty upo = new UserProperties(); if(upo.ExistsProperty(CS_ConnectionId, CS_UserSessionId, "MyApp", "Data1")) { upo.DeleteProperty(CS_ConnectionId, CS_UserSessionId, String.Empty, Trustee.UserIdentifiers.None, "MyApp.Data1"); } } catch (Exception ex) { Response.Write(Server.HtmlEncode(ex.Message)); }
See Also