hello,
i have partial view like this, current the partial viw is in index page so its working, but when i move this partial layout from index page to shared layout(hdeader) so below partial only works on index page and on other pages it is not working
currently i am calling data method on index controller where should i move the data method so partial view can call the method on all pages what ist he global place to pass it
please advice
@using System.Data
@model DataTable
@foreach (DataRow row in Model.Rows)
{
<li class="dropdown megamenu-fw">
<a>@row["gender"]</a>
<ul class="dropdown-menu fullwidth" style="display: none;">
<li class="megamenu-content">
<div class="mega-content">
<div class="mega__item">
<h6><a>Second CAtegory</a>
</h6>
<small>
<ul>
<li><a># level</a></li>
</ul>
</small>
</div>
</div>
</li>
</ul>
</li>
}
Controller
public ActionResult Index()
{
DataTable ds = new DataTable();
CategoriesBL fc = new CategoriesBL();
ds = fc.SelectFirstCategoriesBL();
//Fille properties of contractIdetails
return View(ds);
}