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
Ïà¹ØÎĵµ£º
½ñÌìÔÚÐÞ¸ÄÒÔǰ¿ª·¢µÄÒ»¸öÍøÕ¾µÄʱºòÓöµ½Ò»¸öÎÊÌ⣬ÒòΪ¹¦ÄܵÄÐèÒª£¬ÒÔǰµÄÒ»¸öÊý×ÖÀàÐÍ×ֶθıäΪÎı¾×ֶΣ¬ÒòΪÕâ¸ö×Ö¶ÎÐèÒª°üº¬¶à¸öÀà±ðµÄID£¬ÒÔǰÕâ¸ö×Ö¶ÎÖ»¶ÔÓ¦Ò»¸öIDµÄ¡£
ÍøÕ¾ÊÇASP VBÓïÑԵģ¬Êý¾Ý¿âʹÓõÄÊÇAccess
ÐÞ¸ÄÊý¾ÝÀàÐÍÖ®ºóǰ̨µÄ²éѯ´úÂë¾Í²»ÄÜʹÓÃÖîÈçxID=1ÕâÖÖÌõ¼þÁË¡£ÓÉÓÚÏÖÔÚ¸Ã×ֶαäΪÎı¾ÀàÐ ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if request("action")=1 then
Response.ContentType="application/ms-excel"
Response.AddHeader "content-disposition","attachment;filename=www.xls"
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E ......
Ö¸ÕëÔÚCÖо³£Ìáµ½£¬µ«ÊÇÈκÎÒ»ÖÖÓïÑÔÖж¼Òþ²Ø×ÅÖ¸Õë¡£
aspÒ²ÊÇÈç´Ë£¬ÔÚÎÒÃÇ´«µÝ²ÎÊý¸øfunction»òÕßsubʱ£¬ÎÒÃÇÈç¹û´«µÝµÄÊÇÒ»¸ö±äÁ¿£¬ÄÇôasp»á°ÑÕâ¸ö±äÁ¿µØÖ·´«¹ýÈ¥£¬ËùÒÔÈç¹ûÄãÔÚº¯ÊýºÍ¹ý³ÌÀïÃæ¸ü¸ÄÕâ¸ö²ÎÊý£¬ÄÇôԱäÁ¿Ò²»á¸Ä±ä¡£
'º¯ÊýÀý×Ó
Dim i1,i2
i1=1
'=======================
Function toadd(i)'»ò ......
GridView Ϊ¶¯Ì¬°ó¶¨ DataSet£¬½á¹û (DataSet)dt = grid1.DataSource Äò»µ½¶«Î÷£¬Ïë͵ÀÁÖ±½ÓÌí¼ÓÐв»ÐÐÁË£¬ Ö»ºÃÓÃ×µÄ°ì·¨£¬°ÑGridViewµÄ¶«Î÷µ¹³ÉDataSet£¬È»ºóÔÚDataSetÀï¼ÓÐУ¬×îºó»Ø°ógridview
tryÀïÃæµÄ
DataTable dtable = new DataTable("tb1");
&n ......