AddContent(Content)

Adds the value in its parameter to the page in memory and returns that value when the GetPage() method is called. You can use this value in scripts to pass something that is only available on the server side, such as the current user's email address.

In Sage CRM version 7.2b and later, all ASP pages must use the AddContent() and GetPage() methods to build the HTML for the page. This is required to ensure the correct rendering of the page structure and links, including the left-hand main menu, horizontal tabs, and top content.

Parameters

Content. Specifies the string value returned by the Execute(Arg) method.

Examples

var MyList;
MyList = CRM.GetBlock('PersonGrid');
CRM.AddContent(MyList.Execute("pers_lastname like 'B%'"));
Response.Write(CRM.GetPage());

CRM.AddContent('<' + 'script>var defaultemailaddress=\'' + CRM.UserOption('defaultemailaddress') + '\'<' + '/script>');