ControlsHelper ResolveMacros Method (String, DataRowView, Boolean)Kentico 8.1 API Reference
Replaces macros in text with appropriate value of the datarow and returns the result.

Namespace: CMS.ExtendedControls
Assembly: CMS.ExtendedControls (in CMS.ExtendedControls.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

sourceText
Type: OnlineSystem String
Source text to be processed
dr
Type: OnlineSystem.Data DataRowView
DataRowView containing data that will be used for replacements
encode
Type: OnlineSystem Boolean
Indicates whether macro should be encoded

Return Value

Type: OnlineString
Remarks

It also escapes apostrophes ("'") to "\'" so that they do not break JavaScript.
See Also