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 does it mean your session has timed out?
Do you know caching feature?
What are the security types in ASP/ASP.NET? Different Authentication modes?
What is difference between singleton and single call?
What is csrf attack in asp.net?
How do you identify that the page is postback?
How u refer webservices?
How to create discussion forum in asp.net mvc? : Asp.Net MVC
Is it possible to apply themes to an asp.net application? If yes, then how?
Can you change a Master Page dynamically at runtime?
Define a web service in .net?
What is the maximum amount of memory any single process on windows can address?
List the major built-in objects in asp.net?
What is the use of autowireup in asp.net?
How do I publish my asp.net application to my isp's web server?