Documentation > Services API > ServicesUtil > NewLabelConform(Asset,String,String)

NewLabelConform

Conform new Asset Label to popup field. Note: for use in new.aspx. Sync a given asset's content labelField with .Label text entered in "new" popup. Ignore if modelLabel was entered (prevents saving multiple assets with the "New Model Name" Label. Works best with post-input validation requiring this field and renaming asset to the content labelField on save.

public System.Void NewLabelConform(Asset,String,String)

Parameters

NameDescriptionType
asset The "new" asset being created. CrownPeak.CMSAPI.Asset
labelField The field to be synchronized with the pop-up label. System.String
modelLabel The Label name of the model (if unchanged, cancels the function). System.String

Code Example

C#

Sample:

            
              ServicesUtil.NewLabelConform(asset, "page_label", "Content Page");
            
            

Connect with Crownpeak