I have a textbox , assign required field validator and i
have two buttons 1) save 2) cancel , i want the validator
run only when i click save button, don't validate cancel
button , what to do?
Answer Posted / divakar upadhyay
You have take the validation summary and put ValidationGroup On validation summary for e.g Validationgroup="a" and Put Same ValidationGroup on Save Button and take RequiredField Validator and Set TargetControl i.e Textbox Id should be assigned to the Target Control and There is no need of validationgroup to the cancel button.
In This Way Save Button Will be Validate and Cancel Button should not be validate.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is bound controls
What is viewstate in asp net with example?
How many types of validators are there in asp net?
Explain login control and form authentication.
Describe a bubbled event and how it is used ?
What is application variable?
Can the dictionary object be created in client?s scope ?
Explain the difference between the web config and machine config.
What is round trip in asp.net?
Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc
How would you create a permanent cookie?
What are validators and list some validators of asp.net?
What is different authentication mechanisms used in ASP.NET?
5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?
Difference between Response.redirect vs server.transfer?