A class containing extension methods for ASP.NET MVC System.Web.Mvc.IControllers.
More...
A class containing extension methods for ASP.NET MVC System.Web.Mvc.IControllers.
- Since
- 0.2.0
◆ CreateJson() [1/3]
| static JsonResult Joutsen.Web.Mvc.ControllerExtensions.CreateJson |
( |
this IController |
controller, |
|
|
object |
data |
|
) |
| |
|
static |
Creates a NewtonsoftJsonResult.
- Parameters
-
| controller | the controller |
| data | the data to write to the response as a JSON string |
- Returns
- the ActionResult that contains the JSON data
◆ CreateJson() [2/3]
| static JsonResult Joutsen.Web.Mvc.ControllerExtensions.CreateJson |
( |
this IController |
controller, |
|
|
object |
data, |
|
|
JsonRequestBehavior |
requestBehavior |
|
) |
| |
|
static |
Creates a NewtonsoftJsonResult.
- Parameters
-
| controller | the controller |
| data | the data to write to the response as a JSON string |
| requestBehavior | indicates whether HTTP GET requests from the client are allowed |
- Returns
- the ActionResult that contains the JSON data
◆ CreateJson() [3/3]
Creates a NewtonsoftJsonResult.
- Parameters
-
| controller | the controller |
| data | the data to write to the response as a JSON string |
| httpStatusCode | the status code that is send with the HTTP response |
- Returns
- the ActionResult that contains the JSON data
◆ HttpStatusCode()
| static HttpStatusCodeResult Joutsen.Web.Mvc.ControllerExtensions.HttpStatusCode |
( |
this IController |
controller, |
|
|
HttpStatusCode |
httpStatusCode |
|
) |
| |
|
static |
Creates a new HttpStatusCodeResult with a provided status code.
- Since
- 0.4.1