Explain the methods used to render the views in MVC?

Below are the methods used to render the views from action -
  • View() – To return the view from action.
  • PartialView() – To return the partial view from action.
  • RedirectToAction() – To Redirect to different action which can be in same controller or in different controller.
  • Redirect() – Similar to “Response.Redirect()” in webforms, used to redirect to specified URL.
  • RedirectToRoute() – Redirect to action from the specified URL but URL in the route table has been matched.

Comments

Popular posts from this blog

List out different return types of a controller action method?

3-6 yr Experience Interview Questions in .Net Technologies

Explain what is the difference between View and Partial View?