Network
If Request.ServerVariables ("http_method") = "Get" Then
' If you request a page as a GET, set the page number to 1
Page=1
End If
Set Rec=server. CreateObject ("Adodb.recordset")
Rec. activeconnection= "Dsn=testsys"
Rec. Source= "SELECT *
xml| anti-theft Chain
We can use XMLHTTP to read the file information, and then transfer to the client, so that we can hide the real address of the file. Thus playing a little bit to prevent the hotlinking function.
In this file, we can use many
Requirements: The internal Web site a menu allows only the specified domain user access, can not use the login window, similar to the user name password such things.
Solution: The user clicks the menu, obtains the IP, uses the NBTSTAT-A IP to
HTML section
When a user is logged into the security area of your site, you can use the Login_user in the ServerVariables collection to understand the logged in user account, and of course remember to turn off the Allow anonymous login, and now
Statistics | online | The number of online people recently made a small forum with ASP, customers asked to count the number of online, so spent a little time to write an online statistical visit member function. Many documents are also viewed in the
Anti-Theft chain | Download the first type:
Finally to download the system to do a security chain measures, in the download of the page head did the following code, the relevant code is as follows:
From_url = Cstr (Request.ServerVariables
Display form:
ID1 NAME | ID2 NAME
1 JULIET | 2 Palyboy
3 BABY | 4 TOM
5 LENA | 6 Jery
>> first previous next last page: 1/4 6 Records/page Total record number: 25
Code:
Dim rs
Dim sql
Msg_per_page = 4 ' defines the number of record bars per
Function
1, DateTime digital type System.DateTime currenttime=new System.DateTime ();
1.1 to take the current month and the day seconds
Currenttime=system.datetime.now;
1.2 Take as the year before last
int year =currenttime.year;
1.3 Take the
Skills | performance
Tip 19: Use the browser's validation capabilities
Today's browsers provide support for advanced features such as XML, DHTML, Java applets, and remote Data services. Use these features whenever possible. All of these technologies
The ASPX vb.net gets the real IP function as follows:
Copy CodeThe code is as follows:
Complete test page:
Copy CodeThe code is as follows:
untitled page
Dim client_ip as String = Get_cli_ip
One, the realization method
A function that writes the log, provides several parameters, the user program calls this function can implement log record. Log to the XML file, the log file is generated by date, a new log file is created every day, the
Function 1, DateTime digital type
System.DateTime currenttime=new System.DateTime ();
1.1 to take the current month and the day seconds
Currenttime=system.datetime.now;
1.2 Take as the year before last
int year =currenttime.year;
1.3 Take the
Problem ========== calculate the execution time of the page ===========
Dim startime,endtime
Startime=timer ()
%>
Finally, add the following code at the end of the page code:
Endtime=timer ()
Response.Write "Page Execution Time:" &formatnumber
Traffic | statistics
ASP learn simple, more and the advantages of the combination of the database, so combined with their own once done the site statistics system, and you discuss ASP to write the website statistics system.We have seen NetEase's
Database is hanging horse I believe a lot of people have met. Here, I'll talk about the way I deal with it.
First step: Make a backup of the existing database.
The second step: the implementation of the following ASP file, so you can remove the
1. How to use ASP to determine the virtual physical path of your websiteAnswer: Using the MapPath method
The physical path to this virtual website is:
2. How do I know the browser used by the userAnswer: Use the Request object
Data | Database ' Call method is:
function Safe (str) ' It is used to determine whether a variable passed over contains special characters and does not return true
Dim s_badstr, N, I
S_badstr = "' &<>?%,;:() ' ~!@#$^*{}[]|\/+-= ' CHR (CHR) (9) CHR (3
asp.net|xml| Data | Database Drafting language: Popular forum (we focus on asp,asp. NET forum) Development idea
Veteran can skip this section and attend the next section.
At present, there are countless different versions of online forums, in the
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.