title: How to append custom HTML to the end of view with attributes in ASP.NET MVC?
body: <p>Assume we have some action in controller:</p>
  
  <pre><code>public ActionResult SomeAction()
  {
      return View();
  }
  </code></pre>
  
  <p>I want to have a possibility to append some HTML code to the end of view's HTML result with help of attributes, e.g.:</p>
  
  <pre><code>[SomeHTML]
  public ActionResult SomeAction()
  {
      return View();
  }
  </code></pre>
  
  <p>where</p>
  
  <pre><code>public class SomeHTMLAttribute : ActionFilterAttribute
  {
      public override void OnActionExecuted(ActionExecutedContext filterContext)
      {
          var response = filterContext.HttpContext.Response;
  
          if (response.ContentType == "text/html")
          {
              response.Write("someHTML");
          }
      }
  }
  </code></pre>
  
  <p>Filters (ActionFilterAttribute) allow to append some HTML code to the top or bottom of web-page but not to the end of view's HTML.</p>
  
  <p>How to archive this?</p>