RequiredValidation controls
-
Hi, I have a asp pase. I have one text box, txtName, txtStartDate, txtEndDate. and a button Submit.I have a grid view hand it has edit, delete and cancel buttons. I want to validate my page. I have three RequiredValidation controls for three text boxes. I want that error message should only appear when I click on button. But when I click on some where in grid view or when I select any row in grid view it should not show error message. Thanks.
seema
-
Hi, I have a asp pase. I have one text box, txtName, txtStartDate, txtEndDate. and a button Submit.I have a grid view hand it has edit, delete and cancel buttons. I want to validate my page. I have three RequiredValidation controls for three text boxes. I want that error message should only appear when I click on button. But when I click on some where in grid view or when I select any row in grid view it should not show error message. Thanks.
seema
You will need to toggle the Page_ValidationActive javascript variable similar to what I just outlined here[^]. Only in your case, you probably want to set it to false in the body OnLoad event, and then set it to true in the button's onclick event.
"Half this game is ninety percent mental." - Yogi Berra If you can read thank a teacher, if you can read in English, thank a Marine.
-
Hi, I have a asp pase. I have one text box, txtName, txtStartDate, txtEndDate. and a button Submit.I have a grid view hand it has edit, delete and cancel buttons. I want to validate my page. I have three RequiredValidation controls for three text boxes. I want that error message should only appear when I click on button. But when I click on some where in grid view or when I select any row in grid view it should not show error message. Thanks.
seema
hi, u set ValidationGroup Property of RequiredValidation controls and also for that button on which you want the error message.ValidationGroup should be same for all control
Jintal Patel