ASPÏîÄ¿ÖеĹ«¹²·Ò³Ä£¿é
ÔÚ´óÐ͵ÄASPÏîÄ¿ÖУ¬ºÜ¶àµÄÒ³Ãæ¶¼Éæ¼°µ½·Ò³¹¦ÄÜ¡£Èç¹ûÿ¸öÒ³Ãæ¶¼Ð´Ò»¸ö·Ò³µÄ³ÌÐòµÄ»°£¬ÕâÑùµÄ¹¤×÷¼´½µµÍÁ˹¤×÷Ч
ÂÊ£¬Ò²²»ÀûÓÚ¹¤³ÌµÄÄ£¿é»¯£¬²»ÄÜʹ´úÂëÖØÓá£Òò´Ë£¬°Ñ·Ò³ÕâÑùµÄ¹¦ÄÜÄ£¿é»¯ÊǺÜÓбØÒªµÄ¡£
¡¡¡¡Éè¼Æ·½·¨£º
¡¡¡¡1¡¢µ÷ÓøÃÄ£¿éʱ£¬Ö»ÐèÒª´«µÝ¼Ç¼¼¯ºÍÿҳÏÔʾµÄ¼Ç¼µÄÌõÊý£»
¡¡¡¡2¡¢¿ÉÒÔµã»÷Á´½Ó½øÐзҳ£¬Ò²¿ÉÒÔÖ±½ÓÊäÈëÒ³Â룬»Ø³µºó·Ò³£»
¡¡¡¡3¡¢²»Òª¿¼ÂÇÎļþÃû£¬³ÌÐòµÄÿ´Î·Ò³¶¼ÄÜÔÚµ±Ç°Ò³Ãæ¡£
¡¡¡¡ÏëÇå³þÁËÉÏÃæ3¸öÎÊÌ⣬ÎÒÃǵĹ«¹²·Ò³Ä£¿é¾Í¿ÉÒÔ¶¯ÊÖÁË¡£
<%
'+++++++++++++++++++++++++++++++++++++
'¡ôÄ£¿éÃû³Æ£º ¹«¹²·Ò³Ä£¿é
'¡ôÎÄ ¼þ Ãû£º TurnPage.asp
'¡ô´«Èë²ÎÊý£º Rs_tmp (¼Ç¼¼¯), PageSize (ÿҳÏÔʾµÄ¼Ç¼ÌõÊý)
'¡ôÊä ³ö£º ¼Ç¼¼¯·Ò³ÏÔʾ¹¦ÄÜ
'+++++++++++++++++++++++++++++++++++++
'
Sub TurnPage(ByRef Rs_tmp,PageSize) 'Rs_tmp ¼Ç¼¼¯ ; PageSize ÿҳÏÔʾµÄ¼Ç¼ÌõÊý;
Dim TotalPage '×ÜÒ³Êý
Dim PageNo 'µ±Ç°ÏÔʾµÄÊǵڼ¸Ò³
Dim RecordCount '×ܼǼÌõÊý
Rs_tmp.PageSize = PageSize
RecordCount = Rs_tmp.RecordCount
TotalPage = INT(RecordCount / PageSize * -1)*-1
PageNo = Request.QueryString ("PageNo")
'Ö±½ÓÊäÈëÒ³ÊýÌø×ª£»
If Request.Form("PageNo")<>"" Then PageNo = Request.Form("PageNo")
'Èç¹ûûÓÐÑ¡ÔñµÚ¼¸Ò³£¬ÔòĬÈÏÏÔʾµÚÒ»Ò³£»
If PageNo = "" then PageNo = 1
If RecordCount <> 0 then
Rs_tmp.AbsolutePage = PageNo
End If
'»ñÈ¡µ±Ç°ÎļþÃû£¬Ê¹µÃÿ´Î·Ò³¶¼ÔÚµ±Ç°Ò³Ãæ½øÐУ»
Dim fileName,postion
fileName = Request.ServerVariables("script_name")
postion = InstrRev(fileName,"/")+1
'È¡µÃµ±Ç°µÄÎļþÃû³Æ£¬Ê¹·Ò³µÄÁ´½ÓÖ¸Ïòµ±Ç°Îļþ£»
fileName = Mid(fileName,postion)
%>
<table border=0 width='100%'>
<tr>
<td align=left> ×ÜÒ³Êý£º<font color=#ff3333><%=TotalPage%></font>Ò³
µ±Ç°µÚ<font color=#ff3333><%=PageNo%></font>Ò³</td>
<td align="right">
<%If RecordCount = 0 or TotalPage = 1 Then
Response.Write "Ê×Ò³|ǰҳ|ºóÒ³|ĩҳ"
Else%>
<a href="<%=fileName%>?PageNo=1">Ê×Ò³|</a>
<%If PageNo - 1 = 0 Then
Response.Write "ǰҳ|"
Else%>
<a href="<%=fileName%>
Ïà¹ØÎĵµ£º
aspÎļþËÑË÷
<%
'*************Set newsearch=new SearchFile 'ÉùÃ÷ *************
'*************newsearch.Folder="F:+E:"'´«ÈëËÑË÷Ô´*************
'*************newsearch.keyword="»ã±à" '¹Ø¼ü´Ê*************
'*************newsearch.Search &nbs ......
<%
function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
en ......
4¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——±ýͼ
<%dim total(7,1)
total(1,0)="Öйú¾Óª±¨"
total(2,0)="ÕÐÆ¸Íø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5,1)=1 ......
Array()
¡¡¡¡FUNCTION: ·µ»ØÒ»¸öÊý×é
¡¡¡¡SYNTAX: Array(list)
¡¡¡¡ARGUMENTS: ×Ö·û£¬Êý×Ö¾ù¿É
¡¡¡¡EXAMPLE: <%
¡¡¡¡Dim myArray()
¡¡¡¡For i = 1 to 7
¡¡¡¡Redim Preserve myArray(i)
¡¡¡¡myArray(i) = WeekdayName(i)
¡¡¡¡Next
¡¡¡¡%[/IMG]
¡¡¡¡RESULT: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËØµÄÊý×émyArray
¡ ......
ASP±à³ÌÖÐ20¸ö·Ç³£ÓÐÓõÄÀý×Ó
1.ÈçºÎÓÃAspÅжÏÄãµÄÍøÕ¾µÄÐéÄâÎïÀí·¾¶
´ð£ºÊ¹ÓÃMappath·½·¨
<%= Server.MapPath("\")%>
2.ÎÒÈçºÎÖªµÀʹÓÃÕßËùÓõÄä¯ÀÀÆ÷£¿
´ð£ºÊ¹ÓÃthe Request object·½·¨
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") & ......