Thanks for the Help, Bruce.
Actually the solution you proposed was one.
btnCancelar.Attributes.Add("onclick","return confirm('¿Desea Cancelar la
Edición de la Prima?');");
I also learned (after digging a while in the msdn.com website) that I could
inherit the ImageButton to get the behaviour I was looking for so I would
get a ConfirmImageButton.
I´ve attached the link to that article which seems interesting.
http://msdn.microsoft.com/library/de...ientsidesc.asp
"bruce barker" <no***********@safeco.com> escribió en el mensaje
news:Ot**************@TK2MSFTNGP09.phx.gbl...
btnCancelar.Attributes.Add("onclick","return !confirm('¿Desea Cancelar la
Edición de la Prima?');");
-- bruce (sqlwork.com)
"Jorge Luzarraga C" <jl********@fidens.cl> wrote in message
news:e7**************@tk2msftngp13.phx.gbl... Hello,
I have a Web Form which has two imagebuttons (Save and Cancel). I´d like
to show the user a confirm dialog whenever he clicks on the Cancel Button
and based on his answer to this confirmation continue with the postback or
cancel the action.
How could I do that?
Whenever the user clicks on the cancel buttton I get the dialog but no
matter what answer the user gives I still get a postback.
btnCancelar.Attributes.Add("onclick","event.cancel Bubble =
!confirm('¿Desea Cancelar la Edición de la Prima?');");
TIA,
Jorge Luzarraga