Table of Contents

Class RequestExtensions

Namespace
Dynamicweb.Environment
Assembly
Dynamicweb.Environment.dll
Extension for IRequest that enables the return of strongly typed objects from the requests querystring or form.
public static class RequestExtensions
Inheritance
RequestExtensions
Inherited Members

Methods

GetBoolean(IRequest, string)

Gets the boolean representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static bool GetBoolean(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

bool
The value of a valid boolean object (key). In all other cases false.

GetDate(IRequest, string)

Gets the date representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static DateTime GetDate(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

DateTime
DateTime.

GetDouble(IRequest, string)

Gets the double representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static double GetDouble(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

double
System.Double.

GetFiles(IRequest)

Tries to get posted files from the
public static PostedFileCollection GetFiles(this IRequest request)

Parameters

request IRequest

Returns

PostedFileCollection

GetInt32(IRequest, string)

Gets the integer representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static int GetInt32(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

int
System.Int32.

GetInt64(IRequest, string)

Gets the long representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static long GetInt64(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

long
System.Int64.

GetString(IRequest, string)

Gets the string representation of the value for the given key. The value is parsed using the relevant helper API, so default values for the type might be returned.
public static string GetString(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

string
System.Int64.

HasRequest(IRequest, string)

Determines whether the specified key exists in the request.
public static bool HasRequest(this IRequest request, string key)

Parameters

request IRequest
The request.
key string
The key.

Returns

bool
true if the specified key has request; otherwise, false.

RequestObject(IRequest, string, Type)

Gets the object from request and
[Obsolete("This is no longer used.")]
public static object RequestObject(this IRequest request, string key, Type type)

Parameters

request IRequest
key string
type Type

Returns

object
To top