Recommended: 15 very useful examples in ASP programming (I) 1. How to use Asp to determine the virtual physical path of your website Answer Use the Mappath method p align=centerfont size=4 face=Arialb The Physical path to this virtual website is: /b/font font color=#FF0000 size=6 face=Arial %= Server.MapPath(/)% /font/p 2. How do I
8. Force password input dialog box
Answer to put this sentence at the beginning of the page
<% response.status=401 not Authorized
response.end
%>
9 How to pass variables from one page to another
Answer: Use the HIDDEN type to pass variables
<% 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 Why do I use msgbox in the asp program? The program error says there is no permission
Answer: Since asp is run by the server, if a dialog box can be displayed on the server, you have to wait until someone presses OK before your program can continue to be executed. Generally, there will be no one on the server, so Microsoft has to ban this function and tell you randomly (:) Haha) that there is no permission. However, ASP and client scripts can display a dialog box, as follows:
<% yourVar=test dialog%>
<% script language='javascript'>
alert(<%=yourvar%>)
</script>
11 Is there a way to protect your source code and not let people see it
You can download a Microsoft Windows Script Encoder, which can encrypt asp scripts and client javascript/vbscript scripts. . . However, after the client is encrypted, only ie5 can be executed. After the server is encrypted, only if script engine 5 is installed on the server (you can install one ie5) can be executed.
12 How can I transfer query string from one asp file to another?
Answer the former file to add the next sentence: Response.Redirect(second.asp? & Request.ServerVariables(QUERY_STRING))
13 global.asa file always doesn't work?
Only when the web directory is set to web application, global.asa is valid, and global.asa is valid in the root directory of a web application. IIS4 can use Internet Service Manager to set application settings How can the htm file execute script code like an asp file?
14 How can the htm file execute script code like an asp file?
Answer Internet Services Manager -> Select default web site -> Right mouse button -> Menu properties -> Home directory -> Application settings -> Click button configuration -> App mapping -> Click button Add -> executable browser Select /WINNT/SYSTEM32/INETSRV/ASP.DLL EXTENSION Enter htm method excclusions Enter PUT.DELETE All are confirmed, but it is worth noting that this way, the htm must also be processed by asp.dll, and the efficiency will be reduced.
Share: Asp three-level linkage drop-down menu database version (including source program) % OptionExplicit 'Database: 'location 'City table where the loaction is located' field'loactionid (primary key) 'loactionname name' County table where the district is located' field'locationid (primary key) 'districtid 'districtname 'Table 3 village' field' directory (primary key)