title: Asp.net Core - How to InvokeAsync for a ViewComponent from javascript?
body: <p>I have a simple ViewComponent (i.e. partialview) which i can do an InvokeAsyn() to render a small snippet of HTML by placing the invoke code within my CSHTML.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I call a ViewComponent InvokeAsync (or any method) to retrieve raw data (not necessarily HTML markup) from javascript?</p>
  
  <p><strong>Alternatively</strong></p>
  
  <p>An alternative approach that could totally work is exposing an Asp.net Core API which i can simply call from javascript side.</p>