WebExtensionsErrorView(Controller, Exception, String, NullableHttpStatusCode) - метод
Creates ViewResult object to show web client error page.
Return it from controller method to navigate to error page.
Пространство имён: Tessa.WebСборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.4
public static ViewResult ErrorView(
this Controller controller,
Exception ex,
string? caption = null,
HttpStatusCode? statusCode = null
)
<ExtensionAttribute>
Public Shared Function ErrorView (
controller As Controller,
ex As Exception,
Optional caption As String = Nothing,
Optional statusCode As HttpStatusCode? = Nothing
) As ViewResult
public:
[ExtensionAttribute]
static ViewResult^ ErrorView(
Controller^ controller,
Exception^ ex,
String^ caption = nullptr,
Nullable<HttpStatusCode^> statusCode = nullptr
)
[<ExtensionAttribute>]
static member ErrorView :
controller : Controller *
ex : Exception *
?caption : string *
?statusCode : Nullable<HttpStatusCode>
(* Defaults:
let _caption = defaultArg caption null
let _statusCode = defaultArg statusCode null
*)
-> ViewResult
- controller Controller
- Controller used to create ViewResult.
- ex Exception
- Exception to display in error page. Also sets status code according to the exception.
- caption String (Optional)
- Dialog caption, or null/empty string if default caption is used.
- statusCode NullableHttpStatusCode (Optional)
-
HTTP status code for the result object,
or null, if default value is used according to ex object.
ViewResultCreated object. Return it from controller method to navigate to error page.В Visual Basic и C# этот метод можно вызывать как метод экземпляра для любого объекта типа
Controller. При вызове метода для экземпляра следует опускать первый параметр. Дополнительные сведения см. в разделе
Методы расширения (Visual Basic) или
Методы расширения (Руководство по программированию в C#).
Do not use if not web client is available for current web application.