hi frnd
this is code in asp.net hope may help you
private void lnkPdf_Click(object sender, System.EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.ContentType = "application/vnd.pdf";//for pdf
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
//this.grdReport2.RenderControl(htmlWrite);
*** data to be exported i.e from datagrid or any control source***** }
Response.Write(stringWrite.ToString());
Response.End();
}
if still problem not solved try to post again
regards
nmsreddi