DocumentServer.MailMerge Class
The MailMerge class is a .NET component that can be used to effortlessly merge template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services. The MailMerge class can be found in the TXTextControl.DocumentServer namespace. It is inherited from the System.ComponentModel.Component class. The following describes only the properties and methods defined through the MailMerge class. For a list of properties, methods and events inherited from the System.ComponentModel.Component class see the .NET Framework reference.
Introduced: 14.0.
Syntax
[C#]
public class MailMerge : Component
[Visual Basic]
Public Class MailMerge
Inherits Component
Constructors
Properties
Methods
| Method | | Description |
| GetBlockNames | | Lists the names of all merge blocks contained in the currently loaded template. |
| LoadTemplate | | Loads a template from a file that is used for the merge process. |
| LoadTemplateFromMemory | | Loads a template from memory that is used for the merge process. |
| Merge | | Merges the loaded template with the data of a specific System.Data.DataTable. The second parameter specifies whether the single documents should be merged into one document or splitted into separate documents. |
| MergeBlocks | | Merges all repeating blocks that are contained in the loaded template with the System.Data.DataTable instances contained in the given System.Data.DataSet. The name of the |
| Print | | Prints the merged document. |
| SaveDocument | | Saves the merged document to a file. |
| SaveDocumentToMemory | | Saves the merged document to a byte array or as a string. |
Events
| Event | | Description |
| BlockRowMerged | | Occurs when a merge block row has been merged successfully. |
| DataRowMerged | | Occurs when a data row has been merged successfully. |
| FieldMerged | | Occurs when a field has been merged. |
| ImageFieldMerged | | Occurs when an image field, i.e., a merge field whose name is prefixed with "image:" has been merged. |
| IncludeTextMerging | | Occurs when an IncludeText field has been merged. |
See Also