Transfer value from Controller to Shared View in MVC
<p>I need to send some values from controller to shared view to show in the top of </p>

<pre><code>    [HttpPost]
    [Route("login")]
    public async Task&lt;ActionResult&gt; Login(LogInRequest logInRequest)
    {
        IEnumerable&lt;UserClaim&gt; UserClaims = null;
        User user = null;
        if (ModelState.IsValid)
        {
      user = await GetUserByEmailAndPassword(logInRequest.UserName, logInRequest.Password);
            if (user.Id != 0)
            {
                 showMenu = await ShowLoanMenu(logInRequest);
                if (showMenu)
                {
        ******** I need to send showMenu and user.Name to shared view
             return RedirectToAction(Constants.Views.SearchView, Constants.Views.LoanDriverController);
                }
            }
               .....
              return View(logInRequest);
    }
</code></pre>

<p><strong><em>I don't want to use TempData, viewdata, viewbag or session, how I can send it by querystring or adding to model.</em></strong></p>

<p>This is one of the layout: </p>

<pre><code>      &lt;ul&gt;
            &lt;li class="logo"&gt;
                &lt;img src="~/Content/Images/logo.png" alt="" /&gt;
            &lt;/li&gt;
            &lt;li class="nav-item"&gt;
                  ***  @if(showmenu is true)
                 {
                    &lt;ul&gt;
                        @Html.ActionLink("Loan Driver", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
                    &lt;/ul&gt;
                }
            &lt;/li&gt;
        &lt;/ul&gt;
</code></pre>

<p>and this is another layout:</p>

<pre><code> &lt;div class="header"&gt;
       &lt;div class="master-container"&gt;
        &lt;div class="heading"&gt;Garage&lt;/div&gt;
        &lt;div class="primary-nav"&gt;
            &lt;ul&gt;
                &lt;li&gt;******show name of the person&lt;/li&gt;
                &lt;li&gt;@Html.ActionLink("Logout", "logout", "Home")&lt;/li&gt;
               &lt;/ul&gt;
           &lt;/div&gt;
        &lt;/div&gt;
</code></pre>