I want to be able to display a confirmation message when asp.net checkbox
is clicked, i tried using:
OnClientClick = "return confirm('Are you sure you want to logout?')"
It doesnt report error, but not working, i later found out that asp.net checkbox doen't have OnClientClick
attribute.
I have also done a few research on google still couldn't achieve! Please does anyone know how to do this? Thanks in advance.
After much research i was able to implement this, here is the answer so other users who are facing this same issue can use it:
OnClick="if(!confirm('Are you sure you want to sign out?'))return false;"this works perfectly for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With