当前位置: 首页 > 图文教程 > 网络编程 > ASP > 通过表单创建word的一个例子

ASP
在ASP文件中调用DLL
ASP服务器组件的编程
在ASP.NET访问Excel文件
ADO.NET:通向未来之桥
ASP.Net的几大热点问题
DataList控件也玩分页
ASP.NET高级应用(1)
ASP.NET高级应用(2)
ASP.NET高级应用(3)
关于ASP.Net中的时间处理
ASP编写完整的一个IP所在地搜索类
ASP发送E-MAIL
建立MSXML 测试环境
怎样创建.NET Web Service
怎样创建.NET Web Service(2)
怎样创建.NET Web Service(3)
怎样创建.NET Web Service(4)
ASP.NET中的HTMLControl和WebControl
比尔·盖茨在微软开发者成功之路大会上的主题演讲
运用.NET读写Windows注册编辑表

ASP 中的 通过表单创建word的一个例子


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 165 ::
收藏到网摘: n/a

  先创建一个表单,随便存一个名字好了。

  xxx.html
  〈form action="word_create.asp"〉
  Name: 〈input type="text" name="Name" size="50" maxlength="100"〉
  Email: 〈input type="text" name="Email" size="50" maxlength="100"〉
  Comments:
  〈textarea cols="50" rows="10" name="comments"〉〈/textarea〉
  〈input type="submit" value="Submit"〉
  〈/form〉

  处理表单的ASP程序

  word_create.asp
  〈% Response.ContentType = "application/msword" %〉
  〈html〉
  〈% strName = Request.Querystring("Name")
  strEmail = Request.Querystring("Email")
  strComments = Request.Querystring("Comments")
  %〉
  〈head〉
  〈/head〉
  〈body〉
  〈p align="right"〉〈%=formatdatetime(now,2)%〉〈/p〉

  亲爱的

  〈%= strname %〉:
  我的EMAIL是: 〈%= stremail %〉
  我的内容是: 〈%= strComments %〉
  〈/body〉
  〈/html〉