I am using below code to avoid prompting for filename/path, while exporting telerik grid. In this if I remove last line response.redirect then it again started asking for filename/path. Can you please suggest any other way, because i dont to perform response.redirect after this action?
protected void RadGridData_GridExporting(object source, GridExportingArgs e)
{
string gridfile = "c:\\grid.pdf";
files.Add(gridfile);
using (FileStream fs = File.Create(gridfile))
{
Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
fs.Write(info, 0, info.Length);
}
Response.Redirect(Request.Url.ToString());
}
protected void RadGridData_GridExporting(object source, GridExportingArgs e)
{
string gridfile = "c:\\grid.pdf";
files.Add(gridfile);
using (FileStream fs = File.Create(gridfile))
{
Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
fs.Write(info, 0, info.Length);
}
Response.Redirect(Request.Url.ToString());
}