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 the asp.net mvc folder conventions? : asp.net mvc
What is the difference between “Web.config” and “Machine.Config”?
Which protocol is used to call web service?
What is server components?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
Why is this service branded with windows livetm?
Why is xap important?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
What is role-based security in asp.net?
How tooltip is set through code-behind in ASP.NET?
Explain what are delegates?
Can we have multiple master pages in asp net?
What is localhost in asp.net?
Explain ViewState?
Why would a company use an application service provider?