Hello,
I have a dynamically generated a table, cos the data is from server side, and I am not sure how many rows there can be. I need to button for each row, and if I clicked on one button, I want it to do a async post back instead of full post back. I put the table in a update panel, and dynamically add each button to a AsyncPostBackTrigger, and register the button with ScriptManager, code is below:
For each row I did
AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
trigger.ControlID = myButton.UniqueID,
_UpdatePanel.triggers.add(trigger);
_ScriptManager.RegisterAsyncPostBackControl(myButton);
_UpdatePanel.Update();
Notes: These are happening in the Page_Load events. When the page started loading, it needs to populate the table with rows, and I added triggers and register buttons from there.
however, when I clicked on the button, it does no post back, not full post back, nor async postback, my button has a evenhandler for button.Click, and I had a break point at page load, none of them getting hit when I clicked on them.
Will anyone have the same problem as me?
Thanks a lot in advance,
Cicely