易截截图软件、单文件、免安装、纯绿色、仅160KB

asp文件下载

 <%
If Not IsNull(Request("fileName")) Then r = DownLoadFile(Request("fileName"))
Function DownLoadFile(fileName)
Dim s,fso,f,fLen
fileName = Server.MapPath(fileName)
'create stream
Set s = Server.CreateObject("ADODB.Stream")
s.Open()
s.Type = 1
Set fso = Server.CreateObject("Scripting.FileSystemObject")

If Not fso.FileExists(fileName) Then Response.Write "文件不存在" : Response.End
Set f = fso.GetFile(fileName)
fLen = f.Size
s.LoadfromFile(fileName)

'clear the buffer
Response.Buffer = True
Response.Clear()
Response.AddHeader"Content-Disposition","attachment;filename=" & f.name
Response.AddHeader"Content-Length",fLen
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
'output the file to the browser
Response.BinaryWrite s.Read
Response.Flush


s.Close
Set s = Nothing
Set fso = Nothing
End Function
%>


相关文档:

asp会员注册后自动登陆

<%
set rs=server.createobject("adodb.recordset")
sql="select * from YONGHU where (ID is null)"
rs.open sql,conn,1,3
rs.addnew
rs("USERNAME")=request("username")
rs.update
rs.close
set rs=nothing
conn.close 
set conn=nothing
session("username")=rs("name")
    respo ......

ASP控件大全讲解

4.1 常用的HTML控件
4.1.1 表单控件
用于接收客户端的输入,并将输入的结果提交给服务器处理
1.HtmlForm控件
 所有的Web Form控件必须包含在一对HtmlForm控件标签中
<Form
   Id = "控件标识"
   Runat = "Server"
   Method = "Post | Get"
   Action = "要执行 ......

ASP的DES加密解密

ASP的DES加密解密
2007-05-18 09:49
原文:http://hi.baidu.com/myfav/blog/item/3ebc58828edd79a30cf4d290.html
前两天学到对称密码DES算法,然后就自己亲手写了个实现程序出来,好多地方用得着呐。这里是用ASP实现,当然也就是可以移到VB啦。懂得怎样写后写成什么语言都行啦,只要懂得那门语言。如果有朋友想知道具体D ......

关于ASP Recordset 分页出现负数解决方法及建议


对于Recordset分页时出现负数的现象,相信会有很多人遇到过这个问题,有时百度、GOOGLE也不得其解,现在由我来总结一下。
出现负数,主要和游标类型有关系。(为举例方便,假设已经有一个conn.asp链接数据库的文件并且已经include)现在举一个例子,代码如下:
'===================================================== ......

ASP简介

    ASP全称为Active Server Pages,是一种由微软(M1crosoft)公司开发的服务器端脚本语言运行环境,它可以结合HTML语言和ActiveX组件建立动态、交互、高效的Web服务器端应用程序。当一个用户浏览器从web服务器请求一个AsP网页时,web服务器会
将这个AsP文件发送给web服务器的AsP引擎,AsP引擎将该AsP网页中 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号