I'm deleting an item and want to pop-up a confirmation window before doing all the LINQ related deleting.
What i want is for an be loaded into the modal confirmation window to then perform the server-side functionality.
button on page:
<input type="button" onclick="deleteConfirmation();" value="Eyða korti" id="btnDelete"/>
javascript basically from jquery-ui sample page. I don't want the buttons
function deleteConfirmation() {
$(".confirmation").dialog({
resizable: false,
height: 350,
modal: true,
});
}
markup to load into the modal window:
<div class="confirmation" style="display:none;">
Do you really want to delete...
<asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click" />
<input type="button" value="Cancel" class="button" />
Needless to say The OnClick event doesn't fire up. How do i attain the desired functionality.
Edited: I also tried antoher thing
i put the buttons inside the dialog and then return true/false Then have the onclientclick="return deleteConfirmation()" on the asp button, that worked up to a point because the server side code runs but the popup doesn't await user input.