asp上传类
1.UpLoadClass.asp
<%
Class UpLoadClass
Private p_MaxSize,p_FileType,p_SavePath,p_AutoSave,p_Error
Private objForm,binForm,binItem,strDate,lngTime
Public FormItem,FileItem
Public Property Get Version
Version=""
End Property
Public Property Get Error
Error=p_Error
End Property
Public Property Get MaxSize
MaxSize=p_MaxSize
End Property
Public Property Let MaxSize(lngSize)
if isNumeric(lngSize) then
p_MaxSize=clng(lngSize)
end if
End Property
Public Property Get FileType
FileType=p_FileType
End Property
Public Property Let FileType(strType)
p_FileType=strType
End Property
Public Property Get SavePath
SavePath=p_SavePath
End Property
Public Property Let SavePath(strPath)
p_SavePath=replace(strPath,chr(0),"")
End Property
Public Property Get AutoSave
AutoSave=p_AutoSave
End Property
Public Property Let AutoSave(byVal Flag)
select case Flag
case 0:
case 1:
case 2:
case false:Flag=2
case else:Flag=0
end select
p_AutoSave=Flag
End Property
Private Sub Class_Initialize
p_Error = -1
p_MaxSize = 153600
p_FileType = "gif/jpg/bmp"
p_SavePath = "UpLoadFace/"
p_AutoSave = 0
strDate = replace(cstr(Date()),"-","")
lngTime = clng(timer()*1000)
Set binForm = Server.CreateObject("ADODB.Stream")
Set binItem = Server.CreateObject("ADODB.Stream")
Set objForm = Server.CreateObject("Scriptin
相关文档:
注意:系统需要FSO权限、XMLHTTP权限
系统包括两个文件,其实可以合并为一个。之所以分为两个是因为部分杀毒软件会因为里边含有FSO、XMLHTTP操作而被认为是脚本木马。
调用时,需要在ASP页面的最上边包含主文件,然后在下边写下以下代码
Set MyCatch=new CatchFile
MyCatch.Overdue=60*5 &n ......
页面自动刷新代码大全,基本上所有要求自动刷新页面的代码都有,大家可以自由发挥做出完美的页面。
1)
10表示间隔10秒刷新一次
2)
<script>
window.location.reload(true);
</script>
如果是你要刷新某一个iframe就把window给换成frame的名字或ID号
3)
<script>
window.navigate("本页面url"); ......
第一种方法:
<%
d = date()
response.write d&" "&WeekdayName(Weekday(d))
%>
输出样式:2004-5-7 星期五
************************************************************************* ......
最近很苦恼,当数据访问失败或者成功的时候,要页面的js处理一些效果,只是不知道怎么调用,非常郁闷。终于找
到了一个地方:
ScriptManager.RegisterStartupScript(ListUpdatePanel, typeof(UpdatePanel), "", "alert(1);", true);
在后台的函数中调用这个即可。(针对updatepanel)刷新数据后,就会调用js ......
按照跳转页面的方式,一一来总结
首先说接受页面获取参数的方式:
1)request.querystring。只要url中含有参数,即可传递
比如 地址:index.aspx?label=da
则用Request.QueryString["label"]即 ......