1.CDONTS.NewMail component usage instructions
SetMailObject=Server.CreateObject("CDONTS.NewMail")
MailObject.From="Send Email"
MailObject.To="Message Email"
MailObject.Cc="CC Email"
MailObject.Bcc="Secret Email Delivery"
MailObject.Subject="Mail Subject"
MailObject.Body="Mail Content"
MailObject.MailFormat=0'The format of the mail, 0 is MIME format, 1 is text message
MailObject.BodyFormat=0'The format of the text of the message, 0 means HTML format, 1 means normal text
MailObject.Importance=1'The importance of emails, 0 means low importance, 1 means normal, 2 means high importance
MailObject.AttachFile "Absolute path of attachment", "Attachname"
MailObject.Send
SetMailObject=Nothing
2. The web page will not be cached
Response.Expires=-1
Response.ExpiresAbsolute=Now()-1
Response.cachecontrol="no-cache"
3. Client IP address
Request.serverVariables("REMOTE_ADDR)
4. Methods of recording set objects:
rs.movenext moves the record pointer down one line from the current position
rs.moveprevious moves the record pointer up one line from the current position
rs.movefirst moves the record pointer to the first row of the data table
rs.movelast moves the record pointer to the last row of the data table
rs.absoluteposition=N Move the record pointer to row N of the data table
rs.absolutepage=N Move the record pointer to the first line of page N
rs.pagesize=N Set each page to N records
rs.pagecount returns the total number of pages according to the pagesize setting
rs.recordcount returns the total number of records
rs.bof returns whether the record pointer exceeds the head of the data table. True means yes, false is no
rs.eof returns whether the record pointer exceeds the end of the data table. True means yes, false is no
rs.delete deletes the current record, but the record pointer does not move downward
rs.addnew add record to the end of the data table
rs.update updates data table records
5. Random digital process
Int((Upper Boundary-Next Boundary+1)*Rnd+Next Boundary)
6. Check the input function
FunctionCheck_Input(input)
input=Trim(input)' Remove excess space
input=Server.HTMLEncode(input)'Convert HTML
input=Replace(input,Chr(39),"'")' convert half-width single quotes
input=Replace(input,Chr(34),""")'Convert half-width double quotes
checkinput=input
EndFunction
7. Connect to Access database method
Method 1:
Setconn=Server.CreateObject("ADODB.Connection")
conn.Open"driver={Microsoft AccessDriver(*.mdb)};dbq="&Server.MapPath("data.mdb")