How to display a Word file in a Web page

Source: Internet
Author: User
word| page | Show me to store some Word files in the database but I'll take the following to download ASP files
<%@ Language=vbscript%>
<%
Myid= "Chenhao"
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "Application/msword"
Set Conn=server. CreateObject ("Adodb.connection")
Conn.Open Application ("Jsjxywebdatebase_connectionstring"), Application ("Jsjxywebdatebase_runtimeusername"), Application ("Jsjxywebdatebase_runtimepassword")
Set Rs=server. CreateObject ("Adodb.recordset")
Rs. CursorType =2
Rs. Locktype=3
Rs. Activeconnection=conn
Rs. Source= "SELECT * from Userimage where id= '" & myID & "'"
Rs. Open
Response.BinaryWrite rs ("Userimage")//userimage is now stored in Word files
Response.End
Rs. Close
Set rs=nothing
Conn. Close
Set conn=nothing
%>
Excuse me, is there a mistake?



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.