Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is an asp.net validator? And, mention its types.

1075


What is connection pooling and how to enable and disable connection pooling?

1075


What is the difference between the asp and asp.net?

1040


How can you dynamically add user controls to a page?

1013


What is master page in dtp?

1048


What are the various session state management options provided by asp.net?

1026


Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc

1048


Explain the various authentication mechanisms in asp.net.

1035


What are query strings used for?

982


How can we create Tree control in asp.net?

1086


Explain why datareader is useful?

1046


Is asp.net different from asp? If yes, explain how?

1099


What is the use of asp.net web api?

1145


What are the different types of proxy patterns?

1208


Can master pages be nested?

983