Skype:TextControlSupport
Orders:877-462-4772
TX Text Control - word processing components.

MailMerge.MergeBlocks Method

Description:  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 System.Data.DataTable must match the name of the block in the template. The supported format of the repeating blocks can be found in the ASP.NET User's Guide.

Syntax: 
[C#]
public int MergeBlocks(DataSet mergeData);
[Visual Basic]
Public Function MergeBlocks(ByVal mergeData As DataSet) As Integer
Parameter   Description
 
mergeData Specifies a System.Data.DataSet that contains the merge data.

Return Value:  Returns the number of successfully merged blocks.

Example:  The following example merges a block in a template.
[C#]
DataSet mergeData = new DataSet();

DataTable blockData = new DataTable("section1");
blockData.Columns.Add("name");
blockData.Columns.Add("company");
blockData.Rows.Add(new object[] { "Peter Jackson", "The Imaging Source Europe GmbH" });
blockData.Rows.Add(new object[] { "Jack Peterson", "The Imaging Source LLC" });

mergeData.Tables.Add(blockData);
mailMerge1.MergeBlocks(mergeData);
[Visual Basic]
Dim MergeData As New DataSet()

Dim BlockData As New DataTable("section1")
BlockData.Columns.Add("name")
BlockData.Columns.Add("company")
BlockData.Rows.Add(New Object() {"Peter Jackson", "The Imaging Source Europe GmbH"})
BlockData.Rows.Add(New Object() {"Jack Peterson", "The Imaging Source LLC"})

MergeData.Tables.Add(BlockData)
MailMerge1.MergeBlocks(MergeData)
See also:  Mail Merge, Graphical Overview.
External verification page for ISO 9000:2000 certificate
ISO 9001:2000
certified