Users Pricing

forum

home / developersection / forums / what is difference between return view() and return base.view() in c#?

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

Anonymous User 2683 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?


I am a content writter !


1 Answers