Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Question about clicking a button and calling a button_click event

$
0
0
Hello
I am very new to this. I have a form with a Button1 and a Button2 and Textbox1 and a RequiredFieldValidator. The CausesValidation property of Button2 is set to false.

If the Textbox is null and I press Button1, I get a validation error. That's great.
If the Textbox is null and I press Button2, the Button2_Click event calls the Button1_Click event. No validation occurs. That's bad.
This is a simple and dumb example. What I want to do is call a button_Click event and have validation occur.
If you could tell me how to do this I would be greatful.

Thanks
George

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>