I have an asp button and would like to add a javascript to it. For example, I'd like to display a message Yes/No before submitting to another page. Thanks.
I've also found that if you use attributes.add you have to be carefull if you are using the validation controls with client side code enabled. Doing so also adds onclick events to buttons so you can end up with two onclick events, one of which will not work.
Thank you for reply. And you are right. When I originally posted my question, I had that problem. But I found a way to overcome the problem. Is it a bug in Asp.Net though if you have 2 onclick event and one of them is not working?
Doubt it. Its probably the HTML and Javascript standards that don't allow it. By the time you see the page asp has finished with it and it's all running client side.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.