I try create dynamic menu but i have problem with adding parameters in link to the controller and action, can i add parameter to url.content? or there are the other way please give your insight it will very helpfull
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Menu Example</a>
</div>
<ul class="nav navbar-nav">
@if (Session["Menu"] != null)
{
var MenuMaster = (List<Accountstatement.Models.MenuModel>)Session["Menu"];
var groupByMenu = MenuMaster.GroupBy(x => x.MainMenuName).ToList();
foreach (var MenuList in groupByMenu)
{
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">@MenuList.Key<span class="caret"></span></a>
<ul class="dropdown-menu">
@foreach (var SubMenuList in MenuList)
{
<li><a href="@Url.Content("~/"+@SubMenuList.ControllerName +"/"+ @SubMenuList.ActionName")">@SubMenuList.SubMenuName</a></li>
}
</ul>
</li>
}
}
</ul>
this is the part the url.content is, how can i put the parameter inside url.content?
<li><a href="@Url.Content("~/"+@SubMenuList.ControllerName +"/"+ @SubMenuList.ActionName")">@SubMenuList.SubMenuName</a></li>