You are creating an ASP.NET application by using the .NET Framework 3.5.
You create a Web form in the application. You add a TextBox control and a Button control to the form. When the user clicks the Button contro the input text from the TextBox control is stored in a database.
You also add a Validation control to the form to verify whether the input data is valid before it is stored in the database.
You discover that users who have Javascript disabled in their Web browsers can store invalid data in the database.
You need to ensure that only valid data is submitted to the database.
What should you do?
A.
Submit the data by using the Click event handler of the Button control only when the Page.IsValid property is True.
B.
Add the ValidateRequest = “true”attnbute to the Page directive of the Web form.
C.
Call the Page.Validate method before data is stored on the Click event handler of the Button control.
D.
Set the CausesValidation property of the Button control to True.