Question:You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment:
01 02 ID="rfValidator1" runat="server"
03 Display="Dynamic" ControlToValidate="TextBox1"
04 â–º
05 >
06 â–º
07
08
09 10 ID="ValidationSummary1" runat="server" />
You need to ensure that the error message displayed in the validation control is also displayed in the ValidationSummary
list.
What should you do?
A Add the following code segment to line 06:
Required text in TextBox1
B Add the following code segment to line 04:
Text="Required text in TextBox1"
C Add the following code segment to line 04:
ErrorMessage="Required text in TextBox1"
D Add the following code segment to line 04:
Text="Required text in TextBox1" ErrorMessage="ValidationSummary1"