Question:

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The Web page has a control named PayerForm that contains a TextBox control named PayerID. The PayerID TextBox control accepts the ID of the current payer. You need to ensure that the following requirements are met:

The PayerID TextBox value is validated against a specific format without additional postbacks. The PayerID TextBox value is validated against a database. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)

 

A p { margin-bottom: 0.08in; }

Add the following code fragment to the Web page.

<asp:RegularExpressionValidator

ControlToValidate="PayerId" ID="revPayerId"

ValidationExpression="..."

runat="server">

</asp:RegularExpressionValidator>

 

B p { margin-bottom: 0.08in; }

Add the following code fragment to the Web page.

<asp:CompareValidator runat="server"

ID="compvPayerId" ControlToValidate="PayerID"

Operator="DataTypeCheck" Type="Currency">

</asp:CompareValidator>

 

C p { margin-bottom: 0.08in; }

Add the following code fragment to the Web page.

<asp:CustomValidator

ControlToValidate="PayerID" ID="cvPayerId"

runat="server"

OnServerValidate="cvPayerId_ServerValidate"

ClientValidationFunction="cvPayerId_ClientValidate">

</asp:CustomValidator>

 

D p { margin-bottom: 0.08in; }

Add the following attribute to the CustomValidator control.

EnableClientScript="false"

Add the following attribute to the CompareValidator control.

EnableClientScript="true"

Add the following attribute to the RegularExpressionValidator control.

EnableClientScript="false"

 

+ Answer
+ Report
Total Preview: 1155

Copyright © 2024. Powered by Intellect Software Ltd