Hi,
I'm currently using an AJAX Toolkit 3.5 ConfirmButtonExtender within a ListView (similar to a GridView, for those who know AJAX 1.0 better) and I've placed it within an ItemTemplate in order to confirm the deletion of an item.
<asp:ImageButton ID="deleteItemButton" runat="server" CommandName="Delete" ImageUrl="Images/Icons/user_delete.gif" ToolTip="Delete" />
<cc1:ConfirmButtonExtender ID="confirmButtonExtender" runat="server" ConfirmOnFormSubmit="false" TargetControlID="deleteItemButton" ConfirmText="Delete item?"></cc1:ConfirmButtonExtender>
This works fine, but when I decided to use a ModalPopupExtender together with the ConfirmButtonExtender, I saw that I had to DisplayModalPopupID of the ConfirmButtonExtender to the ID of the ModalPopupExtender. Simple enough - if only this property actually existed on the ConfirmButtonExtender. Perhaps this is something that's just been take away from v3.5 but existed in v1.0? Anyway, I attempted to work around this by not using a ConfirmButtonExtender at all and just linking the ModalPopupExtender to the deleteItemButton. The modal popup displays and hides fine, except that the command doesn't actually get executed. The code for my buttons within the panel shown by the ModalPopupExtender is:
<asp:Button ID="confirmDeleteButton" runat="server" CommandName="Delete" Text="Confirm" /><asp:Button ID="cancelDeleteButton" runat="server" CommandName="Cancel" Text="Cancel" />
Of course, these button IDs are specified via the OkControlID and CancelControlID properties of the ModalPopupExtender, but all to no avail. Could anyone please explain to me where this DisplayModalPopupID property has gone, and more importantly, the correct method to accomplish what I've explained using the AJAX Toolkit 3.5? Thanks...
Alex
Sorry, my mistake. I just realised this property was added to the newest version, which I didn't realise was more recent that mine.
No comments:
Post a Comment