title: Opening a word file after downloading from code behind(asp.net)
body: <p>I have written code to open a Word document after downloading it in code behind. The document is opening fine, but it is not saving in Word format. When I am going to open it, it is asking for selecting the format to open the file.</p>
  
  <p>The code is below:</p>
  
  <pre><code>string FullFilePath = "D:\\ASP\\ASP.doc";
  FileInfo file = new FileInfo(FullFilePath);
  
  if (file.Exists)
  {
      Response.ContentType = "application/vnd.ms-word";
      Response.AddHeader("Content-Disposition", "inline; filename=\"" + txtDate.Text  + "\"");
      Response.AddHeader("Content-Length", file.Length.ToString());
      Response.TransmitFile(file.FullName);
  }
  </code></pre>