title: How can I pass parameters to a partial view in mvc 4
body: <p>I have a link like this:</p>
  
  <pre><code> &lt;a href='Member/MemberHome/Profile/Id'&gt;&lt;span&gt;Profile&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>and when I click on this it will call this partial page:</p>
  
  <pre><code> @{
      switch ((string)ViewBag.Details)
      {
  
          case "Profile":
          {
             @Html.Partial("_Profile"); break;
          }
  
      }
  }
  </code></pre>
  
  <p>Partial page _Profile contains:</p>
  
  <pre><code>Html.Action("Action", "Controller", model.Paramter) 
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code>@Html.Action("MemberProfile", "Member", new { id=1 })   // id is always changing
  </code></pre>
  
  <p>My doubt is that how can I <strong>pass this "Id" to model.parameter part</strong>?</p>
  
  <p>My controllers are:</p>
  
  <pre><code> public ActionResult MemberHome(string id)
      {
          ViewBag.Details = id;
          return View();
      }
    public ActionResult MemberProfile(int id = 0)
      {
          MemberData md = new Member().GetMemberProfile(id);
          return PartialView("_ProfilePage",md);
      }
  </code></pre>