title: MVC Partial cshtml in C# Assembly
body: <p>Is it possible to process a MVC partial file (cshtml) in an C# assembly project and return the HTML?</p>
  <p>For example...
  If I had the following MVC partial in a file within an C# assembly, is there a way to process the contents and return HTML as a string?</p>
  <pre><code>&lt;div class=&quot;ot-item-action&quot; data-actionid=&quot;@Model.ActionId&quot;&gt;
  
      &lt;!-- Prompt --&gt;
      &lt;div class=&quot;ot-item-prompt tts-content-read&quot;&gt;@Html.Raw(@Model.Prompt)&lt;/div&gt;
  
      &lt;!-- Formats --&gt;
      &lt;div class=&quot;ot-item-numeric-container&quot;&gt;
          @Html.Raw(new NumericInput(1, Model.Format).WriteHtml())
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>