gridview print as design show on the form
in asp.net.
you can download the show data on grid or listview or any control in aps.net. just change bold and underline.
protected void
Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition",
"attachment;filename=myexcelfile.doc");
Response.ContentType = "application/vnd.xls";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new
HtmlTextWriter(sw);
GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
//base.VerifyRenderingInServerForm(control);
}