Mondeo Posted August 23, 2007 Posted August 23, 2007 I have an ASP.NET button click event. I want to do some validation and then if theres a problem display a javascript alert messagebox and exit the sub. I've got this working but the page posts back first and I get a blank screen with the alert box on, when I click OK the page loads. How can I throw up this alert box without causing a postback? Is it possible? Thanks Quote
amir100 Posted August 24, 2007 Posted August 24, 2007 How about using the HTML Controls? Quote Amir Syafrudin
Mondeo Posted August 24, 2007 Author Posted August 24, 2007 How about using the HTML Controls? Sorry Amir, I dont follow you? Thanks Quote
amir100 Posted August 24, 2007 Posted August 24, 2007 I am assuming you're doing a client side validation. That is you're doing the validation using client side scripting. That's why I suggested using an HTML Button Control instead of the usual Server Button Control. If you're using the HTML Control then you don't have to worry about any postbacks. Quote Amir Syafrudin
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.