What should you do to ensure that the error message displayed in the validation control ?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment. (Line numbers are included for reference only.)
01 <asp:RequiredFieldValidator
02 ID="rfValidator1" runat="server"
03 Display="Dynamic" ControlToValidate="TextBox1"
04
05 >
06
07 </asp:RequiredFieldValidator>
08
09 <asp:ValidationSummary DisplayMode="List"
10 ID="ValidationSummary1" runat="server" />
You need to ensure that the error message displayed in the validation control is also displayed in the validation summary list.
What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment. (Line numbers are included for reference only.)

01 <asp:RequiredFieldValidator
02 ID=”rfValidator1″ runat=”server”
03 Display=”Dynamic” ControlToValidate=”TextBox1″ >
04
05
06
07 </asp:RequiredFieldValidator>
08
09 <asp:ValidationSummary DisplayMode=”List”
10 ID=”ValidationSummary1″ runat=”server” />

You need to ensure that the error message displayed in the validation control is also displayed in the validation summary 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″



Leave a Reply 0

Your email address will not be published. Required fields are marked *