Documentation > Services API > ServicesPostInput > SetAssetLabel(Asset,PostInputContext,String,String)
SetAssetLabel
ServicesPostInput.SetAssetLabel() Set given asset's Label from specified field in PostInputContext
public System.Void SetAssetLabel(Asset,PostInputContext,String,String)
Parameters
| Name | Description | Type |
|---|---|---|
| asset | The asset to rename | CrownPeak.CMSAPI.Asset |
| context | The current PostInput context | CrownPeak.CMSAPI.PostInputContext |
| refField | The field to rename the asset to follow. | System.String |
| refFieldLabel | The Label of the field to rename, for validation error messages only. | System.String |
Code Example
C#
Sample:
ServicesPostInput.SetAssetLabel(asset, context, "page_label", "Page Label");