| Name | Framework Behavior | Producing Method |
|---|---|---|
| ContentResult | Returns a string literal | Content |
| EmptyResult | No response | |
| FileContentResult FilePathResult FileStreamResult |
Return the contents of a file | File |
| HttpUnauthorizedResult | Returns an HTTP 403 status | |
| JavaScriptResult | Returns a script to execute | JavaScript |
| JsonResult | Returns a data in JSON format | Json |
| RedirectResult | Redirects the client to a new URL | Redirect |
| RedirectToRouteResult | Redirect to another action, or another controller’s action |
RedirectToRoute RedirectToAction |
| ViewResult PartialViewResult |
Response is the responsibility of a view engine |
View/PartialView |
标签归档:mvc
Html.BeginForm add class attribute
@Html.BeginForm("DoSearch", "Search", FormMethod.Post, new { @class = "myclass"})
mvc3 ajax refresh partial page
$.get('@(Url.Action("HeaderLinks", "Common" ))', function (data) {
$('#header-links-wrapper').html(data);
});