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.6.492
Syntax
bool RemoveAsset(
	string assetId,
	bool permenant = false
)

Parameters

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

Return Value

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