Vivekh
Vivekh

Reputation: 4259

Validation summary without other validations

I would like to display the summary of validation in a validation summary with out displaying them in invidual validator means i would like to show only errors in Validation summary i don't want to show in any

Upvotes: 5

Views: 3385

Answers (2)

Yiğit Yener
Yiğit Yener

Reputation: 5986

An alternative solution is to use both ErrorMessage and Text properties of the Validator controls.

  1. Give your Validator controls, post back controls (Buttons, posting Dropdowns etc.) and ValidationSummary control the same ValidationGroup value.
  2. Set * on Text property for your Validators.
  3. Set the value you want to display on ValidationSummary for each of your Validators to ErrorMessage property.

This way you will have your validation descriptions (ErrorMessage) displayed at ValidationSummary control and a * (Text) displayed next to controls that failed validation.

Upvotes: 2

Curtis
Curtis

Reputation: 103348

Set display="none" on your validation controls. This will hide the validation text for the individual validation controls.

Then give them all a validation group linked to a ValidationSummary

Upvotes: 8

Related Questions