ÓÃASPËæ»ú²úÉúËæ»úÊý
<%
Function gen_key(digits)
'Create and define array
dim char_array(50)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array(10) = "A"
char_array(11) = "B"
char_array(12) = "C"
char_array(13) = "D"
char_array(14) = "E"
char_array(15) = "F"
char_array(16) = "G"
char_array(17) = "H"
char_array(18) = "I"
char_array(19) = "J"
char_array(20) = "K"
char_array(21) = "L"
char_array(22) = "M"
char_array(23) = "N"
char_array(24) = "O"
char_array(25) = "P"
char_array(26) = "Q"
char_array(27) = "R"
char_array(28) = "S"
char_array(29) = "T"
char_array(30) = "U"
char_array(31) = "V"
char_array(32) = "W"
char_array(33) = "X"
char_array(34) = "Y"
char_array(35) = "Z"
'Initiate randomize method for default seeding
randomize
'Loop through and create the output based on the the variable passed to
'the function for the length of the key.
do while len(output) < digits
num = char_array(Int((35 - 0 + 1) * Rnd + 0))
output = output + num
loop
'Set return
gen_key = output
End Function
'Write the results to the browser, currently setting a 13 digit key
response.write "<pre>" & gen_key(13) & "</pre>" & vbcrlf
%>
Ïà¹ØÎĵµ£º
<%
Dim Conn, Connstr
Dim strServer, strUid, strPwd, strDB
strServer = "HUA-5780C2D1CCF" 'SQLÊý¾Ý¿â·þÎñÆ÷µØÖ·
strUid = "sa" 'Êý¾Ý¿âÓû§Ãû
strPwd = "123456" ......
1.ControllerÀàÒýÓõÄView»á×Ô¶¯µÄ¶ÔÓ¦µ½Views\XXXĿ¼ÖÐѰÕÒ¡£
ÆäÖÐViews\Shared´æ·Å¹²ÏíµÄÊÔͼģ°å¡£
ËÑË÷˳Ðò£º
Ê×ÏÈËÑË÷\Views\[Controller]£¬Èç¹ûÕÒ²»µ½£¬ÔÙ¿ªÊ¼²éÕÒViews\Shared×ÓĿ¼¡£
2.
½¨Ò飺ÊÓͼµÄÄ£°åÃû³ÆºÍActionÒýÓõķ½·¨Ãû³ÆÏàͬ¡£
ÕâÑùµÄ»°£¬¿ª·¢ÈËÔ±¾Í¿ÉÒÔÊ¡ÂÔView TemplateµÄÃû³Æ¡£
±ÈÈ磺retur ......
<%
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 ......
3¡¢´¿ASP´úÂëÉú³Éͼ±íº¯Êý——ÕÛÏßͼ
<%dim total(7,3)
total(1,0)="Öйú¾Óª±¨"
total(2,0)="ÕÐÆ¸Íø"
total(3,0)="51Job"
total(4,0)="ÐÂÃñÍí±¨"
total(5,0)="ÐÂÎÅÍí±¨"
total(6,0)="ÄÏ·½ÖÜÄ©"
total(7,0)="Ñò³ÇÍí±¨"
total(0,1)="#FF0000,1.5,1,2,¹«Ë¾1"'²ÎÊý1ÏßÌõµÄÑÕÉ«£¬²ÎÊý2ÏßÌõµÄ¿í¶È£¬²ÎÊý3Ï ......
ASP±à³ÌÖÐ20¸ö·Ç³£ÓÐÓõÄÀý×Ó
1.ÈçºÎÓÃAspÅжÏÄãµÄÍøÕ¾µÄÐéÄâÎïÀí·¾¶
´ð£ºÊ¹ÓÃMappath·½·¨
<%= Server.MapPath("\")%>
2.ÎÒÈçºÎÖªµÀʹÓÃÕßËùÓõÄä¯ÀÀÆ÷£¿
´ð£ºÊ¹ÓÃthe Request object·½·¨
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") & ......