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 |
What is the used of "ispostback" property?
how to update data set?
In this case if exception occure in Database which catch block will be exexcuted?
What is Difference between Callbacks and Postback in ASP.NET?
Why we use content place holder in asp.net?
What are the disadvantages of using session?
What are Http handler ?
How do you handle session management in ASP.NET and how do you implement them. How do you handle in case of SQLServer mode ?
Describe the disadvantage of cookies.
How does session work in asp net?
Why session is more secure than cookies?
Can we use MSSql as backend in asp.net...if yes then How.?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)