AspBucket offers ASP.NET, C#, VB, Jquery, CSS, Ajax, SQL tutorials. It is the best place for programmers to learn

Thursday 1 October 2015

Controller return types in ASP.NET MVC

In this blog article we are discussion about MVC return types. If you are new in MVC then you should aware about all return types in MVC. So let's discuss about MVC return types.


Controller Return Types 

  • ViewResult : Renders a specifed view to the response stream.
  • ActionResult : you can return Json,PartialView,View,RedirectToAction.
  • PartialViewResult : Renders a specifed partial view to the response stream
  • EmptyResult : Basically does nothing; an empty response is given
  • RedirectResult : Performs an HTTP redirection to a specifed URL
  • RedirectToRouteResult : Performs an HTTP redirection to a URL that is determined by the routing engine, based on given route data.
  • JsonResult : Serializes a given ViewData object to JSON format
  • JavaScriptResult : Returns a piece of JavaScript code that can be executed on the client
  • ContentResult : Writes content to the response stream without requiring a view
  • FileContentResult : Returns a fle to the client
  • FileStreamResult : Returns a fle to the client, which is provided by a Stream
  • FilePathResult : Returns a fle to the client

0 comments :

Post a Comment

  • Popular Posts
  • Comments