Confirm function on button. We are use OnClientClick="return confirm('Are you sure')" often.
but that is no correct under Ajax. because the real code is Generate return confirm('Are you sure'); __doPostBack('ctl00$ContentPlaceHolder1$lbRestore','')
because the button is normal button and use onclick event no submit type.
if (!confirm('Are you sure?')){return false;}
but that is no correct under Ajax. because the real code is Generate return confirm('Are you sure'); __doPostBack('ctl00$ContentPlaceHolder1$lbRestore','')
because the button is normal button and use onclick event no submit type.
So the event is lose.
Please use
if (!confirm('Are you sure?')){return false;}