Hi
I have added AJAX to my web site and have looked at the various control extenders such as confirm button extender, modal popup extender, etc. They all seem to be linked to a specific control on the page – ie – a button, link button, etc. which the control name is know at design time.
What I want to do is using client side coding (java? Ajax?) have a confirming popup if the user selects the delete command (see the code snippet taken from a repeater control). Highlighted below that in red, you can see the name of the repeater linkButton changes thus none of the Ajax extenders seem to work.
Summarizing, if one of the delete linkButtons is pressed by the user, the Javascript should intercept the postback, create a popup that tests the user to ensure the delete command should be carried out, close the popup and allow the postback to proceed normally. If the user aborts the delete command, then the popup should close and no further action take place.
Is there somewhere I can find code such as this or have I misunderstood the Ajax entenders? Or can some Java guru write the code for me (I know very little about Javascript). (I have been using VB code behind but I think what I require should reside on the .aspx page)
Thanks in advance for your help and have a nice day.
<tdstyle="border-bottom:1px solid #808080"align="left">
<asp:LinkButtonID="btnEdit"runat="server"
CommandName="Edit"
CommandArgument=<%#CreateDetailString(Ctype(Container.DataItem, Data.DataRowView).Item(0)) %>
>Edit
</asp:LinkButton>
<asp:LinkButtonID="btnDelete"runat="server"
CommandName="Delete"
CommandArgument=<%#CreateDetailString(Ctype(Container.DataItem, Data.DataRowView).Item(0)) %>
>Delete
</asp:LinkButton>
<%#CType(Container.DataItem, Data.DataRowView).Item(1) %>
</td>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl00_btnEdit" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl00$btnEdit','')">Edit
</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl00_btnDelete" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl00$btnDelete','')">Delete
</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl01_btnEdit" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl01$btnEdit','')">Edit
</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl01_btnDelete" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl01$btnDelete','')">Delete
</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl02_btnEdit" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl02$btnEdit','')">Edit
</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1_ctl02_btnDelete" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Repeater1$ctl02$btnDelete','')">Delete
</a>