I have list of tabs in my model like
new TabModel(){
Name = "Users",
ControllerName = "Home",
ActionName = "SearchUserData",
RequestValues = new {
area = "Admin",
userId = 12
}
},
new TabModel(){
Name = "Location",
ControllerName = "Home",
ActionName = "SearchUserLocation",
RequestValues = new {
area = "Admin",
userId = 12
}
},
new TabModel(){
Name = "Cities",
ControllerName = "Home",
ActionName = "SearchUserCity",
RequestValues = new {
area = "Admin",
userId = 12,
countryId = 1
}
},
};
In cshtml: my Tabstrip looks like this
.Name("admin-tab-strip")
.Items(s =>
{
foreach (var item in Model)
{
if (item.ControllerName == "SearchUserData")
{
s.Add().Text(item.Name)
.Content(@Html.Action(item.ActionName, item.ControllerName, item.RequestValues).ToString())
.Selected(item.IsSelected);
}
else
{
s.Add().Text(item.Name)
.LoadContentFrom(item.ActionName, item.ControllerName, item.RequestValues)
.Selected(item.IsSelected);
}
}
}))
Since Html.Action is no longer works in .net 8. Need suggestion to overcome this issue.
Now, I'm unable to navigate to the page which has this tabstrip due to Html.Action issue