You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BreadCrumb(Title="Pool Manager", Order = 0, UseDefaultRouteUrl = true)]
public class ManagePoolController : Controller {
[BreadCrumb(Title="List of pool", Order = 1 )]
public IActionResult Index()
{
// code
}
public [BreadCrumb(Title="Create a pool", Order = 1 )]
public IActionResult Create(){
// some code
}
}
When the BreacCrumbAttribute is called on the Controller class Annotation, the followind method (getDefaultControllerActionUrl) return incorect Value :
The getDefaultAction(filterContext) don't return "Index" as in Asp.net core 2.1, because contextFilter.RouteData is not set.
So the breadcrumb don't display Link for "Pool Manager".
Home / Pool Manager / Create a pool
In Asp.net 2.1, Pool Manager is a link to /PoolManager/Index
private string getDefaultControllerActionUrl(ActionExecutingContext filterContext)
{
var defaultAction = getDefaultAction(filterContext);
var urlHelper = getUrlHelper(filterContext);
if (RemoveAllDefaultRouteValues)
{
return urlHelper.ActionWithoutRouteValues(defaultAction);
}
if (RemoveRouteValues == null || !RemoveRouteValues.Any())
{
return urlHelper.Action(defaultAction);
}
return urlHelper.ActionWithoutRouteValues(defaultAction, RemoveRouteValues);
}
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related problems.
lockbot
locked as resolved and limited conversation to collaborators
Jun 24, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary of the issue
A typical Controller
When the BreacCrumbAttribute is called on the Controller class Annotation, the followind method (getDefaultControllerActionUrl) return incorect Value :
The getDefaultAction(filterContext) don't return "Index" as in Asp.net core 2.1, because contextFilter.RouteData is not set.
So the breadcrumb don't display Link for "Pool Manager".
Home / Pool Manager / Create a pool
In Asp.net 2.1, Pool Manager is a link to /PoolManager/Index
So the
Environment
The text was updated successfully, but these errors were encountered: