image button and popup message?

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

I would like to add an image button to my webform that generates a warning
message dialog, then if the user selects yes/ok, then runs code in the image
buttons click event. what is a good way to handle this?

thanks,

craig buchanan
 
Put the following in your Page_Load method

yourimagebutton.Attributes.Add("onclick", "return confirm('yes or no')")

CausesValidation property of the image button should be set to false for this to work

Suresh

----- Craig Buchanan wrote: ----

I would like to add an image button to my webform that generates a warnin
message dialog, then if the user selects yes/ok, then runs code in the imag
buttons click event. what is a good way to handle this

thanks

craig buchana
 
Back
Top