System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; response.ClearContent(); response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" ); response.Flush(); response.WriteFile("File"); response.End(); use this code in page load Response.Expires = 0 Response.Cache.SetNoStore() Response.AppendHeader("Pragma", "no-cache") after that u add ur code in button click.. try this one...