user11224167
user11224167

Reputation:

Net Core 2 equivalent of ChildActionOnly

What is equivalent of ChildActionOnly in MVC Net Core 2? I am migrating .Net 4.6.2 project to Net Core 2.

    /// <returns></returns>
    [ChildActionOnly]
    public ActionResult Index()
    {
        return View();

Upvotes: 16

Views: 8993

Answers (1)

Alexander
Alexander

Reputation: 9632

There is no ChildActionOnly equivalent in ASP.NET Core. Use view components instead. Also see different blogs related to this.

Upvotes: 12

Related Questions