ASP±à³ÌÖÐ20¸ö·Ç³£ÓÐÓõÄÀý×Ó
ASP±à³ÌÖÐ20¸ö·Ç³£ÓÐÓõÄÀý×Ó
1.ÈçºÎÓÃAspÅжÏÄãµÄÍøÕ¾µÄÐéÄâÎïÀí·¾¶
´ð£ºÊ¹ÓÃMappath·½·¨
<%= Server.MapPath("\")%>
2.ÎÒÈçºÎÖªµÀʹÓÃÕßËùÓõÄä¯ÀÀÆ÷£¿
´ð£ºÊ¹ÓÃthe Request object·½·¨
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") <> 0 Then
¡¡¡¡Response.redirect("ForMSIEOnly.htm")
Else
¡¡¡¡Response.redirect("ForAll.htm")
End If
3.ÈçºÎ¼ÆËãÿÌìµÄƽ¾ù·´¸´·ÃÎÊÈËÊý
´ð£º½â¾ö·½·¨
<% startdate=DateDiff("d",Now,"01/01/1990")
if strdate<0 then startdate=startdate*-1
avgvpd=Int((usercnt)/startdate) %>
ÏÔʾ½á¹û
<% response.write(avgvpd) %>
that is it.this page have been viewed since November 10,1998
4.ÈçºÎÏÔÊ¾Ëæ»úͼÏó
<% dim p,ppic,dpic
ppic=12
randomize
p=Int((ppic*rnd)+1)
dpic="graphix/randompics/"&p&".gif"
%>
ÏÔʾ
<img src="<%=dpic%>">
5.ÈçºÎ»Øµ½ÏÈǰµÄÒ³Ãæ
´ð£º<a href="<%=request.serverVariables("Http_REFERER")%>">preivous page</a>
»òÓÃͼƬÈ磺<img src="arrowback.gif" alt="<%=request.serverVariables("HTTP_REFERER")%>">
6.ÈçºÎÈ·¶¨¶Ô·½µÄIPµØÖ·
´ð£º<%=Request.serverVariables("REMOTE_ADDR)%>
7.ÈçºÎÁ´½áµ½Ò»¸±Í¼Æ¬ÉÏ
´ð£º<% @Languages=vbs cript %>
<% response.expires=0
strimagename="graphix/errors/erroriamge.gif"
response.redirect(strimagename)
%>
8.Ç¿ÆÈÊäÈëÃÜÂë¶Ô»°¿ò
´ð£º°ÑÕâ¾ä»°·ÅÔØÒ³ÃæµÄ¿ªÍ·
<% response.status="401 not Authorized"
response.end
%>
9.ÈçºÎ´«µÝ±äÁ¿´ÓÒ»Ò³µ½ÁíÒ»Ò³
´ð£ºÓà HIDDEN ÀàÐÍÀ´´«µÝ±äÁ¿
<% form method="post" action="mynextpage.asp">
<% for each item in request.form %>
<input namee="<%=item%>" type="HIDDEN"
value="<%=server.HTMLEncode(Request.form(item)) %>">
<% next %>
</form>
10.ΪºÎÎÒÔÚ asp ³ÌÐòÄÚʹÓà msgbox£¬³ÌÐò³ö´í˵ûÓÐȨÏÞ
´ð£ºÓÉÓÚ asp ÊÇ·þÎñÆ÷ÔËÐеģ¬Èç¹û¿ÉÒÔÔÚ·þÎñÆ÷ÏÔʾһ¸ö¶Ô»°¿ò£¬ÄÇôÄãÖ»ºÃµÈÓÐÈ˰´ÁËÈ·¶¨Ö®ºó£¬ÄãµÄ³ÌÐò²ÅÄܼÌÐøÖ´ÐУ¬¶øÒ»°ã·þÎñÆ÷²»»áÓÐÈËÊØ×Å£¬ËùÒÔ΢Èí²»µÃ²»½ûÖ¹Õâ¸öº¯Êý£¬²¢ºúÂÒ¸æËßÄã (:
Ïà¹ØÎĵµ£º
1.ControllerÀàÒýÓõÄView»á×Ô¶¯µÄ¶ÔÓ¦µ½Views\XXXĿ¼ÖÐѰÕÒ¡£
ÆäÖÐViews\Shared´æ·Å¹²ÏíµÄÊÔͼģ°å¡£
ËÑË÷˳Ðò£º
Ê×ÏÈËÑË÷\Views\[Controller]£¬Èç¹ûÕÒ²»µ½£¬ÔÙ¿ªÊ¼²éÕÒViews\Shared×ÓĿ¼¡£
2.
½¨Ò飺ÊÓͼµÄÄ£°åÃû³ÆºÍActionÒýÓõķ½·¨Ãû³ÆÏàͬ¡£
ÕâÑùµÄ»°£¬¿ª·¢ÈËÔ±¾Í¿ÉÒÔÊ¡ÂÔView TemplateµÄÃû³Æ¡£
±ÈÈ磺retur ......
ÔÚASPÖÐΪÎÒÃÇÌṩÁËרÃŵÄÈÕÆÚ¼Ó¼õº¯Êý¡£
¡¡¡¡1.ÈÕÆÚÏà¼Ó
¡¡¡¡DateAdd º¯Êý
¡¡¡¡·µ»ØÒÑÌí¼ÓÖ¸¶¨Ê±¼ä¼ä¸ôµÄÈÕÆÚ¡£
¡¡¡¡DateAdd(interval, number, date)
¡¡¡¡DateAdd º¯ÊýµÄÓï·¨ÓÐÒÔϲÎÊý
¡¡¡¡£¨1£©interval ±ØÑ¡Ïî¡£×Ö·û´®±í´ïʽ£¬±íʾҪÌí¼ÓµÄʱ¼ä¼ä¸ô¡£ÓйØÊýÖµ£¬Çë²ÎÔÄ“ÉèÖ ......
<%
Option Explicit
'Êý¾Ý¿â½á¹¹£º
'location
'±í1 loaction ËùÔÚµÄÊÐ ±í
' ×Ö¶Î
' loactionid £¨Ö÷¼ü£©
' loactionname Ãû×Ö
'±í2 district ËùÔÚµÄÏØ ±í
' ×Ö¶Î
' locationid £¨Ö÷¼ü£©
' districtid
'&n ......
<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)
Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBi ......
ASPÓëActiveX¿Ø¼þ½»»¥ÊµÕ½(Ò»)
¹Ø¼ü×Ö:ASP,ActiveX¿Ø¼þ,Êý×ÖÇ©Ãû,°²È«
ActiveX¿Ø¼þÔËÐÐÔÚ¿Í»§¶Ë¡£ÎÒÃÇ¿ÉÒÔ»ñµÃ¿Í»§¶ËµÄһЩÐÅÏ¢£¬ÈçIC¿¨µÄÐÅÏ¢,¿Í»§¶ËµÄÑéÖ¤µÈµÈ¡£µ«ÊÇActiveX¿Ø¼þÒ²ÓÐÐí¶àȱµã£º¿Í»§¶ËµÄ²¿ÊðºÜÀ§ÄÑ£¬Èç¿Í»§¶Ë²»ÄÜÕýÈ·ÏÂÔØ£¬ÏÂÔØÁË ......