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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top