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 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

ASP Design FAQ and Solution Essentials-1

As Microsoft launched the Web page and database solution, ASP because of Microsoft's unique operating system and other technical backing support, so has been rapid development, and is receiving more and more welcome, in the current E-commerce site

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 intercepting string function code (filtering HTML tags)

function Imgstr (str)Dim regexSet regex = new RegExp ' establishes a regular expression.Regex.pattern = "]+) {1} [^<>]*> (]*) (src=) (' | ') &CHR (&) | )? (. [^ ' |s| ' &CHR (& "]*)" (.) (Jpg|gif|png|bmp|jpeg) ('|" &CHR (& "|s|>") (. [ ^>]*) (>) "'

ASP access the method of paging the large amount of data

' This sub-page effect support ' pagination, pagination effect: Home prev ... 2 3 4 5 6 7 ... Next last page This paging mode, has the forum style' ID title content status updatetime' 1 T1 C1 1 2010-5-26 21:16:06' 2 T2 C2 1 2010-5-26 21:16:09' 3 t3

Asp+ajax No Refresh User registration code

reg.asp file Username=request. Form ("username")Password=request. Form ("password") Sql= "SELECT * from Puser where y_username= '" &username& ""Rs.Open sql,conn,1,1If not rs.eof ThenResponse.Write "No"Response.EndEnd IfRs.close Sql= "INSERT into

ASP Cache Implementation Tutorial code

Class CachePrivate obj ' cache contentPrivate Expiretime ' Expiration timePrivate Expiretimename ' Expired time application namePrivate CacheName ' cache content application namePrivate path ' URLPrivate Sub Class_Initialize

Application of string functions in ASP

Application of string functions in ASP--------------------------------------------Author: enlightenedSource: Program Design AllianceHttp://www.pgsun.comEMAIL: liuyong8833@sohu.comWelcome to learn and exchange!-----------------------------------------

Example: asp crawls online real estate information

Getnews. aspAuthor: Tao InternetSource: TaotaoNote: Please indicate the source for reprinting. Untitled Document On error resume next' Server. ScriptTimeout = 999999'================================================ ========================'Character

Asp retrieves data from dynamic forms and writes it to an xml file. It is displayed in xsl.

xsl

  1. Dynamic form interface, refer to on csdn Forum Untitled Document enter the dealer's communication information: Last name: Address: Tel: Enter Inventory Information

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

Download files using ASP

  During IE's document link, if you encounter a document supported by OLE, IE will automatically call the corresponding program to open it. Sometimes this function is not what we need, although we can remind users to right-click --> "save the target

ASP errors

This is a simple paging program. The code is as follows: test page Dim all, cnt, page, digDig = 10' entries per pageAll = 100 'total display entriesCnt = 1Page = Request. QueryString ("page ")Pagenum = all/digResponse. Write ("pagenum =" & pagenum &

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.

Use ASP to make a domain name query system

Developing such a domain name query system is actually a very easy task, as long as we can let the user get the result after the query to see if the domain name entered by others is occupied by others, if it is not occupied, we can apply for it on

Unveil ASP secrets (2)

Request object     Author: mi Xiansheng     The Request object is used to obtain the data sent from the client browser to the server, that is, to obtain information from visitors accessing your ASP. The Request object contains the Form set,

Unveil ASP secrets (4)

Application object     Author: mi Xiansheng     1. Set of Application objectsIn the Application, there are two sets of Contents and StaticObject. You can use these two sets to control whether variables and objects are visible in the entire ASP

Unveil ASP secrets (5)

Session object     Author: mi Xiansheng     We can use the Session object to store the information required for a specific user Session. When a user jumps between pages of an application, the variables stored in the Session object are not cleared,

Upload files using ASP and VBScript (1)

Uploading files from a browser is an easy way to transfer files from a client to the server. Since the third-generation browsers Netscape and Microsoft, most browsers can upload files to the server without providing users with special access methods

Total Pages: 1800 1 .... 982 983 984 985 986 .... 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.