Hi Friends,
On a button click event, I am calling File save dialogue box.
After saving the file, I want to refresh the radgrid.
When I try with RadGrid.Rebind() method, it calls the NeedDatasource event of the grid with no problem.
I can see updated values in object. But I cannot see those updated values in grid.
I need to refresh the page.
So to refresh the page, I called "
this.Page_Load(null, null); "
but no luck.
I have to hit F5 button to refresh the page.
If I remove the code to call Save File Dialogue box, it works perfectly.
There is something wrong with the response of the page.
Could you please help me out?
This is my code :
protected void btnPayment_Click(object sender, EventArgs e)
{
try
{
String FilePath = Server.MapPath(".\\GiroPayments\\" + FileName + "");
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.TransmitFile(FilePath);
response.Flush();
response.End();
rgGiroPayments.Rebind();
this.Page_Load(null, null);
}
catch()
{}
}