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

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

ASP generates XML

The code is as follows Copy Code Dim Rs,sql,foundstrDim Classid,childstrDim Rssbody,rsstitle,rsshomepageurlDim Xmldom,node,cnode,cnode1,msginfoSet xmldom = Server.CreateObject ("Microsoft.FreeThreadedXMLDOM")Xmldom.appendchild

ASP information prompt function and make return or turn

Sometimes we need to give users some feedback when writing ASP, this custom return information function is very convenient for everyone to use ' ************************ ' subroutine name: Information Prompt window ' function: Informational prompt,

How to implement pagination with ASP (i)

Dim CurrentPage ' Defines the current page Dim filename ' filename Const maxperpage=20 ' number of records displayed per page Dim Totalnumber ' Total Records Filename= "Showpages.asp" totalnumber=200 ' Set record total of 200 If not IsEmpty (Request

ASP implementation method to prevent duplicate submission data

The code is as follows Copy Code Session (' Time ') =now ()Const a= #0:0:4# ' defines the number of seconds between intervalsIf session ("Time2") >0 then ' if a valueIf session ("Time2") +a > Sessions ("Time") Then 'Session ("Time2")

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 Mailbox Address verifier

'********************************************' Function name: IsValidEmail' Function: Check email address legality' Parameters: Email----email address to check' Return value: True----Email address is valid' False----Email address is illegal'*********

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

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.

ASP disables external data submission

Server_v1 = Cstr (Request. ServerVariables ("HTTP_REFERER "))Server_v2 = Cstr (Request. ServerVariables ("SERVER_NAME "))If mid (server_v1, 8, len (server_v2) <> server_v2 then%>Warning! You are submitting data from outside !! Please terminate now !!

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

Use ASP to build your website News and Publishing (2)

(2) add and manage daily news contentAfter a news report is submitted, it is submitted to a file named addnew. asp is used to process news content for classification and storage. For display and analysis, the following news content library is read

How to develop an ASP-based online image browser for FLASH MX

Flash mx (FLASH 6) debut, and gave the FLASH guests a reason to faint, because her new face made us excited.I. Start with the new functions of MX.After entering the MX development interface, click "Help => Samples" in the menu bar to open a webpage.

ASP constant table (2)

15. ErrorValueEnum constantThe name, value, and description of the ErrorValueEnum constant are shown in the table F-15.Table F-15ErrorValueEnum constant name, value, and descriptionName value descriptionAdErrBoundToCommand3707 because the Command

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