Skip to content

Why was @Html.Action removed? #343

@glen-84

Description

@glen-84

I was just reading this blog post and I noticed the following:

Subcontrollers – the Html.Action() helper — are not included in the current beta of MVC 6.

Why was it removed? Because of issues with async?

Imagine that I want to render a box in the right column, containing a paged list of items (example [Tournaments box]). I can do the initial rendering with a view component, but view components are not routable (as far as I know), which means that I can't load that view directly (for AJAX paging).

Is there some other way of accomplishing this? The only option that I can think of is to use a view component to render the initial template, and then have it request JSON data for subsequent pages, as opposed to HTML. This is less flexible though, and a bit messy (since you would need a JSON endpoint in addition to the view component).

Related:
https://aspnetwebstack.codeplex.com/workitem/601
http://aspnet.uservoice.com/forums/41201-asp-net-mvc/suggestions/3233329-support-asynchronous-child-actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions