Users Pricing

forum

Home Forums What is difference between return View() and return base.View() in C#? – MindStick

What is difference between return View() and return base.View() in C#?

Anonymous User 2772 21 Sep 2013

My base controller is below:

public class BaseController : Controller
{
    public BaseController()
    {
    }
}

My Home controller is below:

public class HomeController : BaseController
{
    public ActionResult Index()
    {
        return View();
    }
    public ActionResult Login()
    {
        ActionResult action = base.View("Login");
        return action;
    }
}

My question is what is main difference between base.View() and View()? Is there any performance constrain or any other concern?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md