title: Asp.net core from a controller return html as a string or json to a ajax call
body: <p>I'm making a Ajax call to action method which should return Html elements as a string or json. Html should generate using a partialview and model. Please guide me how to acheive it
  Example:something like this</p>
  <p>return View(&quot;_PartialView&quot;, model);</p>
  <p>or</p>
  <pre><code>return ok(&quot;_PartialView&quot;, model);
  </code></pre>