I want to create at runtime some items that must not hit the "async postback".
Actually I have a button for each row in my grid view. This controls must not generate the partial postback but the complete postback ('cause the result must be the download of a report).
Actually I tried in 2 ways:
On page load
add the item to the ScriptManager via:
ScriptManager.GetCurrent(this).RegisterPostBackControl(control);
this code is hitted the right number of time, but partial postback is still generated
On item generation
in this event I do something like:
var button = (Control)sender;
ScriptManager.GetCurrent(this).RegisterPostBackControl(button);
Why isn't this working?
In both cases I hit the specific case and "register" the controls as "do full postback" so way do I get the partial one?
Thank you
I find out a solution that works and that does not involve any particular code / overriding.
I was focussing on the single "automatically-generated" button but when I start thinking about areas and parents everything goes fine.
As solution I simply register the WHOLE GridView to the Script Manager, by this way, all the controller inside generates a full postback instead of a partial one.
In my Page_Load I have now:
ScriptManager.GetCurrent().RegisterPostBackControl(grd_Reports);