ControlsHelperResolveMacros Method (String, DataRow, Boolean) |
Replaces macros in text with appropriate value of the datarow and returns the result.
Namespace: CMS.Base.Web.UIAssembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 10.0.0
Syntax public static string ResolveMacros(
string sourceText,
DataRow dr,
bool encode
)
Parameters
- sourceText
- Type: SystemString
Source text to be processed - dr
- Type: System.DataDataRow
DataRow containing data that will be used for replacements - encode
- Type: SystemBoolean
Indicates whether macro should be encoded
Return Value
Type:
StringRemarks It also escapes apostrophes ("'") to "\'" so that they do not break JavaScript.
See Also