ASP.NET(vb.net) & Word Response.ContentType = applicationvnd.ms-word - This article example scripts you will learn how to Export or Create Word Document (application/vnd.ms-word) using ASP.NET scripts.
ShotDev Focus:
- ASP.NET(vb.net) & Word Response.ContentType = applicationvnd.ms-word
Example
AspNetResponseContentType.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Response.Clear() Response.AddHeader("Content-Disposition", "Attachment;Filename=Word.doc") Response.Buffer = True Response.Charset = "UTF-8" Response.ContentType = "application/vnd.word" Response.write("<table width=500 border=1>") Response.write(" <tr>") Response.write(" <td>Column1</td>") Response.write(" <td>Column2</td>") Response.write(" <td>Column3</td>") Response.write(" </tr>") Response.write(" <tr>") Response.write(" <td>1</td>") Response.write(" <td>2</td>") Response.write(" <td>3</td>") Response.write(" </tr>") Response.write(" <tr>") Response.write(" <td>4</td>") Response.write(" <td>5</td>") Response.write(" <td>6</td>") Response.write(" </tr>") Response.write("</table>") End Sub </script>
Screenshot
3thumping…
…