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 difference between abstract class and an interface?
What is a session in programming?
Why does my asp.net file have multiple tag with runat=server?
Explain about the .NET framework?
Explain parts of assembly?
In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?
Explain the procedure to handle the process request using mhpm events fired? : asp.net mvc
Is it right that ASP.NET Web API has replaced WCF?
in which protocol ASP.NET WEB API Work?
Define resource files.
Explain how can we access static variable?
What is cas?
What is state management react?
What do you understand by aggregate dependency?
What are the main advantages of using asp.net?