nerdexam
Microsoft

70-515 · Question #60

You are implementing an ASP.NET page that includes a text box. You need to validate values that are typed by users to ensure that only numeric values are submitted. Which control markup should you…

The correct answer is C. <asp:TextBox ID="txt1" runat="server" />. JavaScript executes as users enter and leave the focus of the controls on your page. Client-side validation is turned on by default. You can turn it off for specific validation controls by setting the EnableClientScript property to

Consume WCF services

Question

You are implementing an ASP.NET page that includes a text box. You need to validate values that are typed by users to ensure that only numeric values are submitted. Which control markup should you use?

Options

  • A<asp:TextBox ID="txt1" runat="server" CausesValidation="true"
  • B<asp:TextBox ID="txt1" runat="server" EnableClientScript="true"
  • C<asp:TextBox ID="txt1" runat="server" />
  • D<asp:TextBox ID="txt1" runat="server" />

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    6% (1)
  • C
    71% (12)
  • D
    18% (3)

Explanation

JavaScript executes as users enter and leave the focus of the controls on your page. Client-side validation is turned on by default. You can turn it off for specific validation controls by setting the EnableClientScript property to

Topics

#input validation#RangeValidator#ASP.NET controls#numeric validation

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice