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
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)- A6% (1)
- B6% (1)
- C71% (12)
- D18% (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
Community Discussion
No community discussion yet for this question.