Here's the problem,
We're still using .NET 2.0. I have a custom grid view whichs includes a context menu. Each item in the menu is a Button.
One button action, the export to excel, wants to do some Response.Write calls, but this does not work as it's giving me the "Sys.WebForms.P ageRequestManag er" exception whichs tries to parse whetever I write to Response as some kind of Ajax I guess (don't know the full details). Which I can fully understand, because when I press the update, only the update panel does a post-back and not the entire page, so I can not change the Response.
I would have to set a PostBackTrigger on the Export to excel button. The problem is that I can not seem to do this before the PreRender event because then I will get an exception at trigger initialization saying it cannot find the control with the ID of my button. However, if I do this in PreRender phase, it WILL find the control, but nothing changes and still a partial update is performed (I guess because the triggers are already initialised at that point?).
Does anyone know this problem and a solution? I can put the postback trigger on my grid, but that would have performance issues I would like to avoid when it's not needed. I can not use the AddPostBackCont rol method of the ScriptManager - which is the best way to do it - because we're in .NET 2.0.
Or should I take a completely different approach?
Thanks guys
We're still using .NET 2.0. I have a custom grid view whichs includes a context menu. Each item in the menu is a Button.
One button action, the export to excel, wants to do some Response.Write calls, but this does not work as it's giving me the "Sys.WebForms.P ageRequestManag er" exception whichs tries to parse whetever I write to Response as some kind of Ajax I guess (don't know the full details). Which I can fully understand, because when I press the update, only the update panel does a post-back and not the entire page, so I can not change the Response.
I would have to set a PostBackTrigger on the Export to excel button. The problem is that I can not seem to do this before the PreRender event because then I will get an exception at trigger initialization saying it cannot find the control with the ID of my button. However, if I do this in PreRender phase, it WILL find the control, but nothing changes and still a partial update is performed (I guess because the triggers are already initialised at that point?).
Does anyone know this problem and a solution? I can put the postback trigger on my grid, but that would have performance issues I would like to avoid when it's not needed. I can not use the AddPostBackCont rol method of the ScriptManager - which is the best way to do it - because we're in .NET 2.0.
Or should I take a completely different approach?
Thanks guys
Comment