Absrtact: This paper introduces a method for ASP files to be dynamically included, and the ASP class (class) can be instantiated.
ASP, include file/virtual is handled by priority scripting code, so you cannot use include to dynamically include ASP
A class of ASP paging
Tested in 50,000 records, faster than the one in ADO.
'************************************************************************************
' Specific usage
Dim Strdbpath
Dim ConnStr
Dim MP
Set MP = New MyPage
Strdbpath =
Example:
For example: Enter the field name: Username,password,email,telphone
Note: Different field names are separated by commas in English and do not support asterisks
Table name Enter the table name to query: such as: table1
Front desk Form page:
In some cases, you may want to cache the ASP.net page, but you need to update the selected section on the page based on each request. For example, you might want to cache a large portion of a page, but you need to dynamically update the time-related
The ASP.net ImageMap control allows you to create an image that contains a number of areas (hot zones) that can be clicked by the user, which are called "Action points." Each action point can be a separate hyperlink or postback event.
Common
Array () function returns an array ofexpression Array (list)allow data types: characters, numbers canExample:
%>
Return result: An array containing 7 elements was established myarraymyarray ("Sunday", "Monday", ...) "Saturday")
CInt ()
Rnd function
DescribeReturns a random number.Grammarrnd[(number)]The number argument can be any valid numeric expression.
DescriptionThe RND function returns a value less than 1 but greater than or equal to 0. The value of number determines how
1. Compared with the older environment, it is recommended to use a second
Set Dbconnection=server.createobject ("ADODB. CONNECTION ")
DBPath = Server.MapPath ("Customer.mdb")
DbConnection. Open "Driver={microsoft Access driver (*.mdb)};d bq=" &
One technique: Improving the efficiency of using the request collectionAccessing an ASP collection to extract a value is a time-consuming process that takes up computational resources. Because this operation contains a series of searches for the
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
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
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
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:
Function Copymyfolder (Foldername,folderpath)
Sfolder=server.mappath (FolderName)
Ofolder=server.mappath (FolderPath)
Set Fso=server.createobject ("Scripting.FileSystemObject")
If Fso.folderexists (Server.MapPath (
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 +
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
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