thanks for your help.i Perform mail merge from a DataSet into a document with mail merge regions.but when run asp.net this error display:
Found end of mail merge region ‘table’ without matching start.
which ‘table’ is my datatable name in dataset.
this is my code:
protected void Button2_Click(object sender, EventArgs e)
{
const string path = “C:\Users\n\Desktop\”;
Document doc = new Document(path + “a.Docx”);
DataSet data=new DataSet();
DataTable table = new DataTable();
table.Columns.Add(“a”);
table.Columns.Add(“b”);
table.Columns.Add(“c”);
table.Columns.Add(“d”);
table.Columns.Add(“e”);
table.Rows.Add(new string[] { “behzad”, “arsenal”, “man”, “to”, “they” });
//table.Rows.Add(new string[] { “1”, “2”, “3”, “4”, “5” });
data.Tables.Add(table);
doc.MailMerge.ExecuteWithRegions(data);
doc.Save(path + “2.Docx”);
}
can u tell me cause of this error?