title: Asp .net core how to load html file byte[] to iframe src view
body: <p>I'm going to load .html file (byte[]) from my database to &lt; iframe src="" id='chgit'> html element.</p>
  
  <pre><code>public byte[] file { get; set; }
  </code></pre>
  
  <p>I did try this but fail: </p>
  
  <pre><code>public FileResult QuestionHTML(byte[] requestFile)
          {
              byte[] file = requestFile;
              return File(file, "application/html");
          }
  </code></pre>
  
  <p>then in view cshtml :</p>
  
  <pre><code>$("#chgit").attr('src', '@Url.Action("QuestionHTML", Model.Questions[0].file)');
  </code></pre>
  
  <p>result :</p>
  
  <pre><code>Request URL Too Long
  
  HTTP Error 414. The request URL is too long.
  </code></pre>
  
  <p>Please need some help. Thanks.</p>