Hi, All:
I'm populating database records into a panel controls and want to render
that panel into a HtmlTextWriter which will creating a word document. Do you
know how to insert a page break between each records?
Thank you for the help.
Below is my code:
Response.AddHeader("Content-Disposition", "attachment;
filename=NSG_BCP.doc");
Response.ContentType = "application/msword";
Response.Charset = "";
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
foreach(DataRow dr in ds.Tables[0].Rows)
{
PopulateServerPanel(tabindex);
PanelExport.RenderControl(hw);
Response.Write(tw.ToString());
// I want to add a page break here
// -----Help !!!!!
}
Response.End();