Maybe I’m searching with the wrong keywords, but I can’t find a solution to this.
I’ve got an ASPX page on which, within an <asp:Repeater> I want to insert a button (per item) that will:
- ask (JS ‘confirm’) the user if they really want to proceed, then
- call a method on the page class passing in the ID (Guid) from that item.
I can do 1 or 2, but can’t figure out how to call back into the page method from JavaScript.
I’ve tried turning on the EnablePageMethods in the ScriptManager, but that didn’t seem to do what I expected — calling PageMethods.Blah(...) did not seem to have any effect.
Are there any ready examples? In fact, the confirmation string is the same for every entry.
here’s what you need to do:
call your SERVER SIDE code from onClick even of the button