Comparing Values

It's sometimes useful to be able to validate one control's data by comparing it to the data in another control or to a specified value. The CompareValidator control allows you to do both. An example familiar to all Web users would be the need to compare two entries of a user's password. In order to confirm that a user has entered the correct password, most sites require the user to enter the same value twice. Figure 8.4 shows a sample page comparing two text box controls' values.

Figure 8.4. The CompareValidator control allows you to compare the values in two controls.

Follow these steps to add the Password Change form to your ...

Get ASP.NET Developer's JumpStart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.