Table of Contents

Class HttpResponseHelper

Namespace
InSite.Common.Web
Assembly
InSite.UI.dll
public static class HttpResponseHelper
Inheritance
HttpResponseHelper
Inherited Members

Properties

SignOutUrl

public static string SignOutUrl { get; set; }

Property Value

string

Methods

BuildUrl(string, string)

public static string BuildUrl(string path, string parameters)

Parameters

path string
parameters string

Returns

string

CreatePostForm(string, NameValueCollection)

This method creates an HTML form with hidden fields and submits a POST request to a URL.

public static string CreatePostForm(string url, NameValueCollection data)

Parameters

url string
data NameValueCollection

Returns

string

GetHelpUrl(HttpStatusCode)

public static string GetHelpUrl(HttpStatusCode code)

Parameters

code HttpStatusCode

Returns

string

Redirect(WebUrl)

public static void Redirect(WebUrl url)

Parameters

url WebUrl

Redirect(WebUrl, bool)

public static void Redirect(WebUrl url, bool endResponse)

Parameters

url WebUrl
endResponse bool

Redirect(string)

public static void Redirect(string url)

Parameters

url string

Redirect(string, bool)

public static void Redirect(string url, bool endResponse)

Parameters

url string
endResponse bool

Redirect(string, string)

public static void Redirect(string url, string parameters)

Parameters

url string
parameters string

SendFile(HttpResponse, string, Action<Stream>, int?, string, bool)

public static void SendFile(this HttpResponse response, string filename, Action<Stream> write, int? length = null, string mime = null, bool sanitizeFilename = true)

Parameters

response HttpResponse
filename string
write Action<Stream>
length int?
mime string
sanitizeFilename bool

SendFile(HttpResponse, string, byte[], string, bool)

public static void SendFile(this HttpResponse response, string filename, byte[] data, string mime = null, bool sanitize = true)

Parameters

response HttpResponse
filename string
data byte[]
mime string
sanitize bool

SendFile(HttpResponse, string, Stream, int?, string, bool)

public static void SendFile(this HttpResponse response, string filename, Stream stream, int? length = null, string mime = null, bool sanitizeFilename = true)

Parameters

response HttpResponse
filename string
stream Stream
length int?
mime string
sanitizeFilename bool

SendFile(HttpResponse, string, string, byte[], string, bool)

public static void SendFile(this HttpResponse response, string name, string ext, byte[] data, string mime = null, bool sanitize = true)

Parameters

response HttpResponse
name string
ext string
data byte[]
mime string
sanitize bool

SendFile(HttpResponse, string, string, string)

public static void SendFile(this HttpResponse response, string filename, string path, string mime = null)

Parameters

response HttpResponse
filename string
path string
mime string

SendHttp(HttpStatusCode)

public static void SendHttp(HttpStatusCode status)

Parameters

status HttpStatusCode

SendHttp(HttpResponse, HttpStatusCode)

public static void SendHttp(HttpResponse response, HttpStatusCode status)

Parameters

response HttpResponse
status HttpStatusCode

SendHttp400(bool)

public static void SendHttp400(bool redirect = true)

Parameters

redirect bool

SendHttp400(string, bool)

public static void SendHttp400(string message, bool redirect = true)

Parameters

message string
redirect bool

SendHttp400(HttpResponse, string, string, bool)

public static void SendHttp400(HttpResponse response, string path, string message, bool redirect = true)

Parameters

response HttpResponse
path string
message string
redirect bool

SendHttp403(bool)

public static void SendHttp403(bool redirect = true)

Parameters

redirect bool

SendHttp403(HttpResponse, string, string, bool)

public static void SendHttp403(HttpResponse response, string path, string message, bool redirect = true)

Parameters

response HttpResponse
path string
message string
redirect bool

SendHttp404(bool)

public static void SendHttp404(bool redirect = true)

Parameters

redirect bool

SendHttp404(string, bool)

public static void SendHttp404(string path, bool redirect = true)

Parameters

path string
redirect bool

SendHttp404(HttpResponse, string, bool)

public static void SendHttp404(HttpResponse response, string path, bool redirect = true)

Parameters

response HttpResponse
path string
redirect bool

SetNoCache()

public static void SetNoCache()

ToQueryString(NameValueCollection)

public static string ToQueryString(NameValueCollection collection)

Parameters

collection NameValueCollection

Returns

string