title: Render other controller method in razor view
body: <p>As far as I know, a view is bound to a controller's action method like <code>PatientController</code> 's <code>Details</code> action method results are implemented in <code>Patient-&gt;Details.cshtml</code> inside the <code>Views</code> folder.</p>
  <p>My question is how to call another controller action method like calling <code>Appointment</code>'s <code>Index</code> (in which I implemented a simple search <code>Index(string ID))</code> inside <code>Patient</code>'s <code>Details</code> and how to render or display the results.</p>
  <p>I tried this inside <code>Details</code> (Patient)</p>
  <pre><code>&lt;form asp-controller=&quot;Appointments&quot; asp-action=&quot;Index&quot; asp-route-id=&quot;ID&quot; method=&quot;get&quot;&gt;
      &lt;p&gt;
          &lt;dl class=&quot;row&quot;&gt;
              &lt;dt class=&quot;col-sm-2&quot;&gt;
                  @Html.DisplayNameFor(m =&gt; m.ID)
              &lt;/dt&gt;
              &lt;dd class=&quot;col-sm-10&quot;&gt;
                  @Html.DisplayFor(model =&gt; m.ID)
              &lt;/dd&gt;
          &lt;/dl&gt;
      &lt;/p&gt;
  &lt;/form&gt;
  
  </code></pre>
  <p>But that is rendering <code>Patient</code> ID property.</p>