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
How many types of cookies are available in asp?
Define static member?
Contrast OOP and SOA. What are tenets of each ?
Where is the view state data stored?
Which method do you use to enforce garbage collection in .net?
Are there resources online with tips on asp to asp.net conversions?
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?
What is the difference between asp.net and mvc?
What is Web API?
what is the difference between response.write() and response.output.write()?
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
What is difference between URL and URI?
What is the function used for removing an event listener?
List the events in page life cycle.
What is globalization and localization in asp net?