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
can s/w quality assurance engineer switch field to programming side i m very much interested in programming but not much good in it
Define what is razor? : asp.net mvc
What is application Object?
Explain the difference between webfarm and webgardens in .net?
What is x xss protection?
What are cookies in your browser?
What is the difference between union and join?
What does mvc represent in asp.net? : asp.net mvc
Can the unique key be null?
What are the events in a page life cycle?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
What is server infrastructure?
Describe state management in asp.net?
What is custom attribute?
What is the use of web.config and machine.config files?