Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I need this code very urgent ,please help me to get the code and execute this program
Posted
Updated 22-Jan-10 17:32pm
v2

1 solution

code is below
protected void Button1_Click(object sender, EventArgs e)
{
    Response.Clear();
    Response.Buffer = true;
    
    Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");
    
    Response.ContentEncoding = System.Text.Encoding.UTF7;
    Response.ContentType = "application/vnd.word";
    System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
    this.GridView1.RenderControl(oHtmlTextWriter);
    Response.Output.Write(oStringWriter.ToString());
    Response.Flush();
    Response.End();
}


|I need this code very urgent ,please help me to get the code and execute this program
|Tags: C++, C#


but your Tag inclues C++:confused: & then you mentioned that you need the code urgently.:confused:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900