Announcing the ASP.NET MVC 3 Release Candidate
page 9 of 13
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 37188/ 186

Granular Request Validation

ASP.NET MVC has built-in request validation support that helps automatically protect against XSS and HTML injection attacks.  Sometimes, though, you want to explicitly turn off request validation for some scenarios where you want users to be able to post HTML content (for example: blog authoring or CMS content editing). 

You can now add a [SkipRequestValidation] attribute to models or viewmodels that disables request validation on a per-property basis during model binding:

image

Adding the above attribute to your model/viewmodel enables you to set it once and have it apply in all scenarios.


View Entire Article

User Comments

Title: Help with output catching   
Name: Victor D
Date: 2010-12-02 6:53:47 PM
Comment:
Hello, I'm implementing the output catching but I need to pass a parameter and with the code in this page (passing a category parameter) didn't work. Always render the same page even if I change the parameter value
Title: MVC3   
Name: Ansal
Date: 2010-11-25 12:02:11 AM
Comment:
useful One

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2018 ASPAlliance.com  |  Page Processed at 2018-05-23 9:00:03 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search