GeneratePreview Method (DisplayableCampaignItem, StringDictionary)
Generate the HTML preview for a CampaignItem given the template and property set to use for the preview.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Function GeneratePreview ( _
campaignItem As DisplayableCampaignItem, _
context As StringDictionary _
) As String
'Usage
Dim instance As CampaignItemManager
Dim campaignItem As DisplayableCampaignItem
Dim context As StringDictionary
Dim returnValue As String
returnValue = instance.GeneratePreview(campaignItem, _
context)
public string GeneratePreview(
DisplayableCampaignItem campaignItem,
StringDictionary context
)
public:
String^ GeneratePreview(
DisplayableCampaignItem^ campaignItem,
StringDictionary^ context
)
public function GeneratePreview(
campaignItem : DisplayableCampaignItem,
context : StringDictionary
) : String
Parameters
- campaignItem
Type: Microsoft.CommerceServer.Marketing..::.DisplayableCampaignItem
A DisplayableCampaignItem for which a preview is generated
- context
Type: System.Collections.Specialized..::.StringDictionary
A dictionary containing the display property values to use when generating the preview.
Return Value
Type: System..::.String
A DisplayableCampaignItem containing the HTML or XML for the rendered (formatted) campaign item.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The context parameter is a nullNothingnullptra null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic). |
Remarks
Generates the HTML by processing the DisplayTemplate with values from the campaign item.
The context is a collection of name-value pairs containing context values that should be inserted into the template.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.