He conducts instructor-led online training courses in ASP. NET MVC, and Design Patterns for individuals and small groups.
He is a published author and has authored or co-authored books for Apress and Wrox press.
The Page_Load event handler creates a new Guid using Guid. It then sets the Validation Group property of Button1, Text Box1 and Required Field Validaror1 to this Guid string.
The following code shows how this property can be created: As you can see, the set block of Validation Group property (you can name this property anything you want) assigns the supplied value to the Validation Group of Button1, Text Box1 and Required Field Validator1.
Once the Validation Group property is created you can set it from the Web Form as follows: As you can see the Validation Group property of Test UC1 and Test UC2 is set to some different and unique value.
Changing the color or the font size will likely not reach your entire audience. There are also users who are visually impaired and who use screen readers.
A best practice is to use additional cues to indicate problems, so you are using several attributes in combination.