PrepAway - Latest Free Exam Questions & Answers

You need to disable request validation

You are developing an ASP.NET MVC application.
The application must allow users to enter HTML in a feedback text box only.
You need to disable request validation.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the HttpRequest.Form property to read the unvalidated form value.

B.
Apply and set the Validatelnput attribute on the controller action to FALSE.

C.
Use the HttpRequest.Unvalidated property to read the unvalidated form value.

D.
Apply and set the CausesValidation attribute on the controller action to FALSE.

Explanation:
The HttpRequest.Unvalidated Property provides access to HTTP request values without triggering
request validation.

7 Comments on “You need to disable request validation

    1. HRVAT says:

      The B you are referring to would have been correct had it been the Attribute was set on the Action method in the Controller rather than the Textbook as mentioned in the option. There is no property named ValidateInput at the textbox.
      Answer C is right




      0



      0

Leave a Reply