Hi,
following is the code for creating a pdf file from bytes. it is working fine.
but i want to save the pdf file in a folder.
how it is possible.
SqlDataAdapter da = new SqlDataAdapter("select * from downloads where id=93 ", con);
DataSet ds = new DataSet();
da.Fill(ds);
string pdfName = ds.Tables[0].Rows[0]["filename"].ToString();
Byte[] bytes = (Byte[])ds.Tables[0].Rows[0]["downloads"];
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = ds.Tables[0].Rows[0]["filename"].ToString();
Response.AddHeader("Content-Disposition", "attachment;filename=" + ds.Tables[0].Rows[0]["filename"].ToString());
Response.BinaryWrite(bytes);
Response.Flush();
Response.End();
regards
Baiju