PrepAway - Latest Free Exam Questions & Answers

You need to disable requestvalidation

You are developing an ASP.NET MVC application. The application must allow users to enter JavaScript ina
feedback text box only. You need to disable requestvalidation. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Apply and set the CausesClientSideValidation attribute on the text box to FALSE.

B.
Apply and set the ValidateInput attribute on the text box to FALSE.

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

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

Explanation:
Provides access to HTTP request values without triggering request validation. (http://msdn.microsoft.com/en-us/library/system.web.httprequest.unvalidated.aspx)

3 Comments on “You need to disable requestvalidation

  1. gfd says:

    Answer is probably B, or maybe D

    CausesClientSideValidation attribute doesn’t exist

    ValidateInput would need to be applied to the action method in the controller not the text box. But would disable request validation.

    HttpRequest.Form provides access to the forms variables. You still get request validation though

    HttpRequest.Unvalidated, well the documentation says this works, but I can’t find a way to amke it work. So maybe the anser is D.




    0



    0

Leave a Reply