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?
Answers were Sorted based on User's Feedback
Use property CauseValidation="false" for the Cancel Button
Is This Answer Correct ? | 87 Yes | 9 No |
Answer / sneha gupta
set validationGroup = 'Save' for save button and textbox
but leave it blank for cancel button.
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / 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 |
Answer / smit sisodia
set validation control="false" of cancel button
Is This Answer Correct ? | 1 Yes | 2 No |
how can u create the blog in asp.net with C#?what is the data type u will use to store in sql server?
What is the difference between User Controls and Master Pages
22 Answers Deloitte, IBM, IntraLogic, Markit, TCS,
What is the difference between an EXE and a DLL?
18 Answers Infosys, JK Associates, Persistent, TATA, Technosoft, Wipro,
Do cookies store passwords?
Where we create sessions for Banking Applications and how to create? expalin with code?
What is form method?
What are the advantages of the code-behind feature?
5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?
What is query string in asp.net?
is it possible to use web site without web server from remote place?
1 Answers ABC, Mannar Company, Quadrant,
What are the cookies types in asp.net?
What does uri mean?