Highlight ASP Article original code
Add Time: October 29, 2000 source site: China Technology Network
' File:CodeBrws.asp
' Overview:this formats and writes the text of the selected page for
' The View Script Button
' This file is provided as part
Introduction to the Basics of server scripting
First, let's review the basics of how Web Server Pages are executed:
1, the client through the browser's address bar typing address to send the request to the server side
2, the server received the
Jayesh Patel, Bryan Acker and Robert McGovern
Infusion Development
Scope of application:
Microsoft asp.net 2.0
Absrtact: Although ASP.net 2.0 is completely backward-compatible with ASP.net 1.1, it also brings a lot of internal changes to ASP.net,
The code is as follows
Copy Code
function ShowPage (sto,allpage,page) ' Displays the number of pages based on total pages and current pagesDim first,lastPage=max (min (page,allpage), 1) if (allpage>1) thenif (allpage>10)
User_agent=request.servervariables ("Http_user_agent")Http_reffer=request.servervariables ("Http_referer")Server_name=request.servervariables ("SERVER_NAME")' Check if the current user is Spider-Manfunction Check (user_agent)Allow_agent=split
This tutorial tells you to use the ASP to determine the current browsing user from there, if from that search engine and so on, let's look at the wording.
function Getsearchkeyword (srefererurl) { //Search engine keywords var p = "("
A lot of the previous chat room program Oh, only use two files Oh. Let me see the first HTML file.
asp Simple Chat Room program #000000 #ff0000 #008000 #0000ff #800080 #008080 #808000 to #000000 #ff0000 #008000 #0000ff #800080 #008080
Private Function contentpagination (strcontent)
Dim Contentlen, Maxperpage, paginate
Dim arrcontent, Tempcontent, I
On Error Resume Next
Strcontent = Newasp.readcontent (strcontent)
Strcontent = Replace (Strcontent, "[NextPage]",
In fact, this method to limit the number of words there are defects, that is, in the interception, English mixed words, English also intercepted by a word
The following is a modified function, for the landlord reference
The calling method does
Online Translator
' On Error Resume Next
' If the speed is slow, you can adjust the following time. Per second
Server.ScriptTimeout = 999999
'========================================================
' Character encoding function
'================
ASP's function to connect to a database
A new method of database connection Developers sometimes think of a page in which we need to read and write a database that contains similarThe code, in fact, when you do not have any read-write database
This is based on the user's choice whether to allow the user name password to be saved in the cookie Oh, we pay special attention to the code blue codes Oh.
Set Rs=server.createobject ("Adodb.recordset")Exec= "SELECT * from Yrwl_tb_admin where yhm=
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