Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > ASP.NET > ASP.NET Word.Application > ASP.NET Word Response.ContentType = "application/vnd.ms-word"



Clound SSD Virtual Server

ASP.NET Word Response.ContentType = "application/vnd.ms-word"

ASP.NET Word Response.ContentType = "application/vnd.ms-word" คำสั่ง application/vnd.ms-word ไม่ได้เป็นการ Convert หรือ รายงานข้อมูลในรูปแบบของ Ms Word น่ะครับ เพียงแต่เป็นการระบุว่าให้ให้ไฟล์ดังกว่าเปิดด้วยโปรแกรม Microsoft Word เท่านั้น

Syntax

Response.ContentType = "application/vnd.ms-word"


ตัวอย่าง

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

ASP.NET & Word

ASP.NET & Word


ASP.NET Response.ContentType






   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2008-10-26 21:01:35 / 2011-09-08 22:42:49
  Download : Download  ASP.NET Word Response.ContentType =
 Sponsored Links / Related

 
ASP.NET Config Word (Word Application)
Rating :

 
ASP.NET Connect to Word Application
Rating :

 
ASP.NET & Word (Word Application) - Create Word Document
Rating :

 
ASP.NET & Word (Word Application) - Page Setup
Rating :

 
ASP.NET & Word (Word Application) - BuiltInDocumentProperties
Rating :

 
ASP.NET & Word (Word Application) - Font & Style
Rating :

 
ASP.NET & Word (Word Application) - Paragraphs & Range
Rating :

 
ASP.NET & Word (Word Application) - Page Breaking
Rating :

 
ASP.NET & Word (Word Application) - Create/Insert Table (Tables.Add)
Rating :

 
ASP.NET & Word (Word Application) - Add/Insert Picture (AddPicture)
Rating :

 
ASP.NET & Word (Word Application) - Open Document (Documents.Open)
Rating :

 
ASP.NET & Word (Word Application) - Word Document Sample Report
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่