Hello guys.
I have a grid with a ImageButton in a template column. In the click event of this button, I have this code:
But, when I click this button, I have an error:
"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed"
My grid is inside an ajax panel, and I think it is the problem, because I put another button out of ajax panel, with the same code in click event, and it works fine.
What's the best option for this case?
Thanks in advance.
Regards.
I have a grid with a ImageButton in a template column. In the click event of this button, I have this code:
FileInfo file= new FileInfo("D:\\projetos\\GED\\content\\upload\\00001\\20100510104408625_aurora_boreal_noruega.JPG"); |
Response.Clear(); |
Response.ContentType = "application/octet-stream"; |
Response.AddHeader("Content-Disposition", "attachment; filename=" + file + ""); |
Response.AddHeader("Content-Length", file.Length.ToString()); |
Response.Flush(); |
Response.WriteFile(file.FullName); |
But, when I click this button, I have an error:
"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed"
My grid is inside an ajax panel, and I think it is the problem, because I put another button out of ajax panel, with the same code in click event, and it works fine.
What's the best option for this case?
Thanks in advance.
Regards.