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
i have 3+ exp in .net? i am going interview now but they asked me do you know any TOOL? which tool will i study please refer me?
Elaborate differentiation between Cache and Application?
What is a 1x1 pixel?
What is the purpose of asp.net?
Which protocol is used to call a web service?
Do you know caching feature?
What is the concept of view state in asp.net?
Which authentication uses a combination of windows and iis authentication?
In a Repeater control how one can provide an alternating color scheme ?
What is difference between ispostback and autopostback in asp net?
What is the request flow used for asp.net mvc framework? : asp.net mvc
can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?
Explain the components of web form in asp.net
What does clearing cache?
What are different methods of session maintenance in asp.net?