Place this in the Page_Load event. Note that the first parameter of the Add
method is the JavaScript "onclick" event and the second parameter is a
JavaScript statement.
ImageButton1.Attributes.Add("onclick", "if (!confirm('Are you sure?'))
return false;");
"mg" <mg@theworld.com> wrote in message
news:DB**********************************@microsof t.com...
I would like the code in the click event handler of an ImageButton to run
only after a popup confirm appears and the user clicks its 'OK'. The
'CauseValidation' property of the ImageButton is 'true'