title: Dynamic CRM Plugin download Word document
body: <p>I have created CRM plugin, which on Case create need to download a document to the client. When I create a case plugin is working but it doesnt download a document. 
  In console i can see a content of document is returned through POST request
  ..AppWebServices/InlineEditWebService.asmx but not opened or downloaded. </p>
  
  <p>Im new in this so I will be a very thankful on any help. My code is bellow:</p>
  
  <p>My code is bellow:</p>
  
  <pre><code>protected void ExecutePreValidateCaseCreate(LocalPluginContext localContext)
  {
  if (localContext == null)
  {
     throw new ArgumentNullException("localContext");
  }
  String FileName = "Test.docx";
  String FilePath = @"C:\Template\temp\Test.docx"; 
  
  HttpContext.Current.Response.Clear();
  HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName);
  HttpContext.Current.Response.ContentType = "application/force-download";
  HttpContext.Current.Response.TransmitFile(FilePath);
  HttpContext.Current.Response.Flush();
  HttpContext.Current.Response.End();
  } 
  </code></pre>