Click or drag to resize

IAssetManagerRemoveAsset Method


Removes a single Asset by ID.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
bool RemoveAsset(
	string assetId,
	bool permenant = false
)

Parameters

assetId
Type: SystemString
ID of the Asset to remove.
permenant (Optional)
Type: SystemBoolean
If true, completely removes the Asset from the CMS. Otherwise, asset is placed in the Asset Recycle Folder.

Return Value

Type: Boolean
True if Asset exists, false otherwise.
Remarks

If "asset" is null, returns false.

If the Asset is not under Asset Recycle Folder, it will be moved to Recycle Folder. If it is already under Recycle Folder, it will be permenantly purged.

Two events are fired during execution of this method: BeforeAssetDelete and AfterAssetDelete.

See Also