Author: ramarao.mcts | Posted on: 10/3/2010 7:38:40 PM | Views : 386

protected void btnExport_Click(object sender, EventArgs e)
    {
        string attachment = "attachment; filename=Article.pdf";
        Response.ClearContent();
        Response.AddHeader("content-disposition", attachment);
        Response.ContentType = "application/pdf";
        StringWriter stw = new StringWriter();
        HtmlTextWriter htextw = new HtmlTextWriter(stw);
        dvText.RenderControl(htextw);
        Document document = new Document() ...

Go to the complete details ...