Reposted: SNOW Date: 2005-01-04 Popularity: 120 Buy Virtual Hosts to send U disk to send mouse to send 30G hard drive --- Business online old style virtual hosts How to use ASP to judge your website's virtual physical path answering mappath method < P align = "center"> the physical path to this virtual website is: b> <% = server.mAppath ("/")%> font> p> 2. How do I know the browser used by the user? A method of using 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. How to calculate the average number of repetitive access to the daily reply solution <% startdate = datediff ("d", now, "01/01/1990") if strdate <0 Then StartDate = startdate * -1 avgvpd = int ((Usercnt) / Startdate)%> Display result <% response.write (avgvpd)%> That is it.this page has referenced Since November 10,1998 4 How to display random image <% DIM P, PPIC, DPIC PPIC PPIC PPIC PPIC = 12 Randomize P = INT (PPIC * RND) 1) DPIC = "Graphix / Randompics /" & P & ". GIF"%> Show > preivous page or with images such as:
> 6. How to determine the other party's IP address answer <% = Request.ServerVariables (" remote_addr)%> 7.
How to link to a picture <% @ Languages = VBScript%> <% response.expires = 0 strimagename = "graphix / errors / erroriamge.gif" response.redirect (strimagename)%> 8. Forced input password dialog How to transfer this sentence <% response.status = "401 NOT Authorized" response.end%> 9 how to transfer variables from one page to another with Hidden type to transfer variable <% form method = "POST "Action =" mynextpage.asp> <% for each item in request.form%> <% next%> form> 10 Why using msgbox in the ASP program, the program error has no right to answer ASP is the server running, if you can display a dialog in the server, then You have to wait until you have pressed, your program will continue to execute, and the general server will not be deserved, so Microsoft has to ban this function, and tell you (:) Oh) No permission. However, ASP and client script combination can display a dialog box, as Follows: <% Yourvar = "test dialog"%> <% script language = 'javascript'> alert ("<% = Yourvar%>") Script> 11 Is there a way to protect your own source code, do not give people an answer to download a Microsoft's Windows Script Encoder, which can encrypt the ASP script and client JavaScript / VBScript script. . . However, after the client encryption, only IE5 can execute, after the server-side script is encrypted, only Script Engine 5 installed on the server can be executed. 12 How can I transfer Query String from an ASP file to another? The answer before the answer is added: Response.Redirect ("SECOND.ASP?")) 13 global.asa files always don't work? Only the web directory is set to Web Application, Global.asa Effective, and the root directory of a Web Application is valid.