I have two TextBox and two Buttons in my page.
One is hidden and the other one is displayed.
When I click the Button1
, it will save data of the two TextBox
and will validate each TextBox by the RequiredFieldValidator
.
Then when I click Button2
, it will just hide itself (Button2
) and will show the hidden TextBox
.
Both TextBox
has RequiredFieldValidator
validating against Button1
's Event click.
Now my issue is when I simply enter text to the 1st TextBox and click save, the button click is validating the required field for hidden field. I just want to validate the 2 textbox when it is showing.
How can I avoid this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…