Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.NET Core 6 MVC action return ActionResult<T>breadcrumb will not be generated automatically #104

Open
ruyut opened this issue Dec 15, 2022 · 0 comments

Comments

@ruyut
Copy link

ruyut commented Dec 15, 2022

If action return IActionResult, breadcrumb will be generated automatically.
but if action return ActionResult<T>, breadcrumb will not be generated automatically.

I create a test project on this github repository

test code(in my test repository):

private List<string> _list = new List<string> { "a", "b", "c" };

[Breadcrumb("Page2", FromAction = nameof(Page1))]
public IActionResult Page2()
{
    ViewData["Title"] = "Page2";
    return View(_list);
}

[Breadcrumb("Page3", FromAction = nameof(Page1))]
public ActionResult<List<string>> Page3()
{
    ViewData["Title"] = "Page3 - Can't get the breadcrumb to work";

    return View(_list);
}

asp.net core mvc 6.0
dotnet version: 6.0.402
SmartBreadcrumbs version: 3.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant