Validation.Unvalidated Method (HttpRequestBase, String)
Returns the specified value from the Request object without checking it first for HTML markup and client script.
Namespace: System.Web.Helpers
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Unvalidated ( _
request As HttpRequestBase, _
key As String _
) As String
'Usage
Dim request As HttpRequestBase
Dim key As String
Dim returnValue As String
returnValue = request.Unvalidated(key)
public static string Unvalidated(
this HttpRequestBase request,
string key
)
[ExtensionAttribute]
public:
static String^ Unvalidated(
HttpRequestBase^ request,
String^ key
)
static member Unvalidated :
request:HttpRequestBase *
key:string -> string
public static function Unvalidated(
request : HttpRequestBase,
key : String
) : String
Parameters
- request
Type: System.Web.HttpRequestBase
The HttpRequestBase object that contains values to exclude from validation.
- key
Type: System.String
The name of the field to exclude from validation. key can refer to a form field, to a cookie, or to the query-string variable.
Return Value
Type: System.String
A string that contains unvalidated text from the specified field, cookie, or query-string value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequestBase. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).
Remarks
Security Note |
---|
If you exclude a field from request validation, you must check it yourself to be sure it does not include malicious markup or code. |