Ajaxcontrol toolkit ConfirmButtonExtender with radiobuttonlist control

Posted by chugh97 on Stack Overflow See other posts from Stack Overflow or by chugh97
Published on 2010-05-26T08:16:19Z Indexed on 2010/05/26 8:21 UTC
Read the original article Hit count: 280

I have a Yes/No Radiobutton List, When the asp.net page is loaded, if there are items in the gridview this radio is defaulted to Yes. Now if the user clicks no, I have to delete all the items for the gridview and persist them in db. But I want to show a confimation whether the user wants to go ahead doing this operation. If user clciks Yes then go ahead and delete the rows in gridview if no then keep the original radio setting to Yes. I have been struggling to get this to work as the ConfirmButtonExtender which opens up a modalpopup extender even before I know what has been clicked on the radio. If the radio is preselected with Yes, then if I clcik no, the Modal extender is shown and in the Page PreRender event handler the value of the radio is still Yes and not No as extender is run on click using ajax and it doesnt know the correct value of the radio.Even if I use onClick client side javascript to find out which option has been chosen the difficulty is then executing the server side delete command to the db. Has anyone enconuntered this problem before? Any solutions would be appreciated.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about AJAX