Copy Code code as follows:
If IsNumeric (ID) =false then Exit Sub
strSourceFile = Server.MapPath (dataxml& "/advertisement/" &id& "/adv.xml")
Set objxml =server.createobject ("Microsoft.XMLDOM") ' creates an XML pair like
Objxml.load
Web development often uses the useragent information of various mainstream browsers, let's see how the ASP can get it.
Use Example One
ASP Source Code:
Example two:
ASP to obtain the current browser UA method:
The
Asp
Response.Buffer = True
Response.ExpiresAbsolute = Now ()-1
response.expires = 0
Response.CacheControl = " No-cache "
Response.AddHeader", "Pragma", "No-cache"
Html
JavascriptFor JS, you can refer to JS in the back of a
Under the IIS6 is not the problem, put the system under IIS7.5 windows2008r2 64-bit system appears adodb.connection error ' 800a0e7a ', the following gives a detailed solution, in fact, very simple.
Copy Code code as follows:
ADODB.
The number one killer of the script vulnerability, the database download vulnerability, is now well known to more and more people. In the era of rapid updating of information technology, the loopholes are followed by various coping strategies, such
This function is necessary, many hackers to make trouble, black database, will inject a lot of virus JS, in storage and display text data, use this function filter, can avoid a lot of trouble
clearhtml Code
' Clear HTML code function clearhtml
Replacing the data read in the database with replace, if the field is not empty is normal, but ifThe following prompts appear when you are empty:
Microsoft VBScript run-time error ' 800a005e '
Invalid use Null: ' Replace '
The main problem is
ASP development may sometimes use a large segment of if ... else, but if the content of dynamic Response.Write, you want to more convenient to read the code, you can use Response.End () to the implementation of ASP, also similar to the use of break,
The scripting.dictionary of VBScript creates a Dictionary object that is similar to the value of the key index, indexed directly to the specified value.
Examples of scripting.dictionary use in VBScript are as follows:
Copy Code code as
In the development of the content system, the process of separating the content from the form, that is, the process of replacing the relevant content according to the user's custom page template. This and many outside the whole station of the
ASP query XML by keyword'------------------------------------------------------' Read file readtxtfile (filename)'------------------------------------------------------Function Readtxtfile (FileName)Dim Fso,f1,ts,filepathFilepath=server.mappath
--Please select--
Entire site
Current directory
Dim Fso,objfolder,objfile,strpath
Set Fso=server.createobject ("Scripting.FileSystemObject")
Strpath= "."
Call BL (strpath)
function bl (strpath)
Set Objfolder=fso.getfolder (Server.MapPath
Write the program today to write a text file repeatedly, so write a process function, hope for everyone useful.
Code:
Copy Code code as follows:
Sub write2file (strfile, strcontent, Blnappend)
' Write file
' strfile filename (path),
Copy Code code as follows:
Set js = Server. CreateObject ("ADODB.") RecordSet ")
Sql= "SELECT top * from article ORDER BY id DESC"
Set JS = conn. Execute (SQL)
Do as not js.eof
Title=js ("title")
Addate=js ("Addate")
Foolcat = Foolcat +
Author: Gan Ganping;
Suppose you want to create a simple guest book, you can build a database in which to store the user's information. However, if you don't need the power of the database, using the FSO to store the information will save you
This article will continue to introduce some of the Web dynamic features written in ASP. Because of the inconsistent web browser standards so that how to make their own web site to adapt to a variety of different browsers to become the most
A decoding problem is encountered when developing with ASP. Although using Request in ASP to get encoded URL strings will automatically decode, but Request.BinaryRead (request.totalbytes) when the post data is not decoded, so can only manually
This is just an ASP tip class thing, although it is suitable for each of the different file names call this function, but there are prerequisites, let's take a closer look at the story.The following section is the basic page-splitting code:
Today and everyone together using ASP to simulate the implementation of Google suggest style pull-down menu, directly on the code
1. Front Code:
untitled document Hint: Lose
In the keyword, the program automatically matches
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service