ASP Perfect SQL anti-injection instance program

Dim Query_badword,form_badword,i,err_message,err_web,name '------Define partial head---------------------------------------------------------------------- Err_message = 1 ' processing mode: 1 = hint information, 2 = Turn page, 3 = prompt before

ASP authentication use method and verification Code program

If Request.QueryString ("action") thenOption ExplicitResponse.buffer=trueNumcodeDim znumFunction Numcode ()Response.Expires =-1Response.AddHeader "Pragma", "No-cache"Response.AddHeader "Cache-ctrol", "No-cache"Dim znum,i,jDim ados,ados1Randomize

ASP hidden download address and anti-theft chain code

Strfilename=strfileResponse.buffer=trueResponse.ClearSet s=server.createobject ("ADODB. Stream ")S.openS.type=1On Error Resume NextSet fso=server.createobject ("Scripting.FileSystemObject")If not fso.fileexists (strFileName) ThenFrom_url=cstr

asp.net in C # ObjectCache, OutputCache cache

The code is as follows Copy Code Cache Action Classpublic class Cache{private static list _allusecachekey = new list ();private static ObjectCache _cache = Memorycache.default; Add cachekey unique Value Timeout public static void

ASP common database connection and operation method and skill

1.ASP connect to an Access database Dim conn,mdbfile Mdbfile=server.mappath ("database name. mdb") Set Conn=server.createobject ("Adodb.connection") Conn.Open "Driver={microsoft Access Driver (*.mdb)};uid=admin;pwd= database password; dbq=" &mdbfile

An effective method to prevent ASP injection

  code is as follows copy code function Killn (ByVal s1) ' filter numeric parameter if not IsNumeric (S1) then killn=0 Else if s1〈0 or s1〉2147483647 then Killn=0 Else killn=clng (S1) End-if end-if End Function

ASP SQL anti-injection code

Dim sql_injdataSql_injdata = "' |and|or|exec|insert|select|delete|update|count|*|%| Chr|mid|master|truncate|char|declare "Sql_inj = Split (Sql_injdata, "|")If request.querystring<> "" ThenFor all SQL get in Request.QueryStringFor Sql_data=0 to

ASP get post SQL anti-injection function

ASP get post SQL anti-injection function '----an interception that implements the injection of a GET request-----Dim sql_injdata,sql_inj,sql_get,sql_post,sql_dataSql_injdata = "' |and|exec|insert|select|delete|update|count|*|%|

ASP SQL Security filtering and anti-injection program code

chr

'**************************************************' Function name: Replacebadchar' Function: Filter illegal SQL characters' Parameters: Strchar-----The characters to filter' Return value: Filtered character'******************************************

ASP prevents code from being refreshed

Prevent refreshing pages'================================================Sub Preventrefresh ()Dim Refreshtime,isrefreshRefreshtime = 10 ' Prevent refresh time, unit (seconds)Isrefresh = 1 ' Use anti-refresh function, 0 = no, 1 = yesIf Isrefresh = 1

The ASP Msxml.xmlhttp collects the data and solves the garbled problem

' In the ASP to collect data will generally use the ASP XMLHTTP this component to the example, many times collected in the Chinese will be garbled, we use The BYTESTOBSTR function transformation solves the problem of collecting garbled characters.

ASP generates XML document instance program code

XML section: ------------------------------------------------------------------ASP Tutorial Section:------------------------------------------------------------------- Untitled Document ' Establish a Database

Tips for improving ASP applications (2)

(2) If you are using a version of VBScript 5.0 or higher, you can use the with ... End-with structure, which can also improve the performance of the ASP. (3) Generally, avoid the use of session variables, because each session variable takes up a

Convenient ASP paging program

Set conn = server. createobject ("adodb. connection ")DBPath = Server. MapPath ("sap_mis.mdb ")Conn. Open "driver = {Microsoft Access Driver (*. mdb)}; dbq =" & DBPathSet rs = server. createobject ("adodb. recordset ")SQL = "select sap_adon_record. *

ASP: securely writes data to the database, reads data normally, and displays data in different scenarios

  For example, if the field styledesc is used, the data must be 50 bits and char characters. Can I limit only 50 bits,All characters can be entered. As long as it is char-type, it can be used as long as the database permitsIn this way, securely

Use Response object 2003 in ASP Programming

The main function of the Response object in ASP Programming is to transfer data from the browser to the server to the browser client. We know that ASP scripts are executed on the server, it does not provide the "value" function. To have the output

Implementation of Cookie read/write in ASP

Writecookie. asp%> Cookie writing example Response. Write "Write Cookie: "Response. Cookies ("Cookie1") ("key1") = "KeyValue1"Response. Cookies ("Cookie1") ("key1") = "KeyValue2"Response. Cookies ("Cookie1"). Expires = "July 31,199 9"Response.

Upload files using ASP and VBScript (2)

Upload script usage     The following is an example of a script Upload application. The downloaded files in this article provide the files and code in the example. Release the compressed file to a path and configure a virtual path for your network

Implement the whisper function using ASP

I once worked on a complex chat room, and almost had all the functions of the BBS chat room, but it was a waste of resources because it was made using applications. I think it is more reliable and easier to use databases.You can set a database chat

ASP function application method and example (2)

21. IsObject ()FUNCTION: Returns a boolean value indicating whether an expression refers to an automation object.SYNTAX: IsObject (expression)ARGUMENTS: expression is any valid expression.EXAMPLE: Set con = Server. CreateObject ("ADODB. Connection ")

Total Pages: 1800 1 .... 1105 1106 1107 1108 1109 .... 1800 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.