title: How to get sessionStorage(client side) value in controller or model or view(before body render) MVC
body: <ol>
  <li>what I would like to do is when the first time app will load I will store Menu in client-side sessionStorage and next time any page load get menu from sessionStorage</li>
  <li>My website flow is LoginPage > Dashboard page</li>
  <li>Dashboard page renders as index.csHtml and uses _Layout.csHtml partial view to the reader</li>
  <li>I successfully store sessionStorage value on client-side but I am not able to get this save value in _Layout.csHtml Page.</li>
  <li>In _Layout.csHtml body part this code use <code>@{Html.RenderAction("RenderTopMenu", "Common");}</code> and I need to pass sessionStorage  value in this RenderAction
  EX: <code>@{Html.RenderAction("RenderTopMenu", "Common", new {model=sessionStorage});}</code> </li>
  </ol>
  
  <pre><code>PAGE - Index.csHtml 
  
  @{
     ViewBag.Title = "Welcome To " + SessionManagement.CompanyName;
     Layout = (ViewBag.isPartialView) ? null : "~/Views/Shared/_Layout.cshtml";
  }
  
  PAGE - _Layout.cshtml
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body class="pageContent"&gt;
  
     @{Html.RenderAction("RenderTopMenu", "Common");}
  &lt;/body&gt;
  
  PAGE - Controller
  public ActionResult RenderTopMenu(DashboardViewModel AdminMenus)
         {
             DashboardViewModel Dashboardmodel = new DashboardViewModel();
             Dashboardmodel = DashboardModel.GetTopMenu(Dashboardmodel);
  }
  
  PAGE - Model
  
  public List&lt;AdminMenus&gt; GetMenuListFromCache(int AccountMode, DashboardViewModel Dashboardmodel)
         {
  List&lt;AdminMenus&gt; AdminMenusList = sessionStorage.getitem("Menu") as List&lt;AdminMenus&gt;;
  
  
                     if (AdminMenusList == null) //not in cache
                     {
                         AdminMenuParamsModel menus = new AdminMenuParamsModel()
                         {
                             CompanyID = SessionManagement.IntCompanyID,
                             MenuID = AccountMode
                         };
  
                         AdminMenusList = new DashboardBLL(SessionManagement.DevPasswordConnectionString).ProcessGetMenus(menus);
                         AdminMenusList = DashboardModel.SetMenuName(AdminMenusList);
                         sessionStorage.setitem("Menu") = AdminMenusList;
                     }
                     return AdminMenusList;
  }
  
  NOTE: In a model for only explanation purpose I put sessionStorage.getitem but really I can not use this.
  </code></pre>