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

Explain what is routing in MVC? What are the three segments for routing important?

What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?

Explain what is the difference between View and Partial View?