Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In asp.net RequiredFieldValidator What is difference between Text and ErrorMessage?

In asp.net RequiredFieldValidator What is difference between Text and ErrorMessage property?

like image 556
Abdul Saboor Avatar asked Aug 22 '12 11:08

Abdul Saboor


2 Answers

Text : The message to display when validation fails.

ErrorMessage : The text to display in the ValidationSummary control when validation fails. Note: This text will also be displayed in the validation control if the Text property is not set.

Ref : http://www.w3schools.com/aspnet/control_reqfieldvalidator.asp

like image 83
Usman Khalid Avatar answered Nov 13 '22 04:11

Usman Khalid


The ErrorMessage property shows up in the ValidationSummary control. Text shows up next to the controlToValidate. If you set the Display property as None the Text won't appear.

like image 43
Conrad Lotz Avatar answered Nov 13 '22 06:11

Conrad Lotz