Prevent postback in update panel depending on JS confirm box

EditedI got an update panel which contains a gridview and inside each row images (delete icons) to delete that row. I'm trying to condition that given an answer on a regular JavaScript confirm pop up. \[code\]$(function(){ $("img.delete").on("click", function(evt){ return false; //Does not work /*or*/ evt.preventDefault();//Does not work either });});\[/code\]Html rendered:\[code\]<td> <img id="ctl00_ctl00_ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_Content_Content_Content_Content_pwd.umbraco.ViewMulti.Dashboard_7_DashboardGrid_ctl02_DeleteControl140" class="delete" onclick="__doPostBack('ctl00$ctl00$ctl00$ctl00$ctl00$ctl00$ContentPlaceHolderDefault$Content$Content$Content$Content$pwd.umbraco.ViewMulti.Dashboard_7$DashboardGrid','Delete$0')" width="20" height="20" title="Remove this Profile from your list." src="http://stackoverflow.com/images/delete_item.png" alt="Remove this Profile from your list." style="border-width:0px;">\[/code\]It doesn't work because a postback is always performed by the update panel which has its UpdateMode to its default in the sense that I'm not setting it in the markup.
 
Back
Top