Hi,
I've got the following code that I am running server-side to export the grid and save it to PDF. I then don't want to show the Dialog box to the user so I can then do more in code to attach the saved PDF to an email.
This is the code I have to save the file:
How do I then prevent the dialog box from getting displayed?
Or can I move the above code to get the grids ExportOutput code without having to go through this method?
Thanks, Mark
I've got the following code that I am running server-side to export the grid and save it to PDF. I then don't want to show the Dialog box to the user so I can then do more in code to attach the saved PDF to an email.
This is the code I have to save the file:
protected void grdDailyList_GridExporting(object source, Telerik.Web.UI.GridExportingArgs e)
{
string path = Server.MapPath("~/DailyList/list.pdf");
if (File.Exists(path))
File.Delete(path);
using (FileStream fs = File.Create(path))
{
Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
fs.Write(info, 0, info.Length);
}
}
How do I then prevent the dialog box from getting displayed?
Or can I move the above code to get the grids ExportOutput code without having to go through this method?
Thanks, Mark