The content we store in the database is in HTML format, but sometimes we need to display this content in a unformatted format, which is filtered with regular expression implementations.
Copy Code code as follows:
function nohtml (str)
Dim
1, the Pure intercept string
Copy Code code as follows:
function Cutstr (Thestr1,strlen)
Dim l,t,c
L=len (THESTR1)
If LT=0
For Dxy1=1 to L
C=abs (ASC (thestr1,dxy1,1))
If c>255 Then
T=t+2
Else
T=t+1
End If
If T>=
ASP.net paging allows you to set page-first, previous, next, last-link text displayed in the foreground. This is simply a reference to simple functions, and it is more handy to delve into the fundamentals of it.
Containerid the destination
Start writing a team piece (get started with components)
This article is mainly for the people who want to improve their ASP level to write! The ASP code into a component, the developer is not only to speed up the ASP, but also to protect their own
Therefore, to conserve server resources, the connection should be shut down as much as possible to free up resources for the connection, and the technique of shutting down the recordset without closing the recordset is called a disconnected
Mode one:
Copy Code code as follows:
Function Isselfrefer ()
Dim Formurl,relurl
Formurl=lcase (the Trim (request). ServerVariables ("Http_referer"))
If formurl= "" Then
Isselfrefer = False
Else
Relurl= "http://" & Trim
For the website programming beginner, always will surf the net to look for some source code to look, but in the passage of time or stay in the phase of the change, do not understand how to write a complete Web site program. So I began to write such
Procedure name: catch (str)
How to use:
Copy Code code as follows:
On Error Resume Next
' Your code, such as a database connection
Call catch ("message displayed to the user")
Features: Clear IIS error messages, custom
Beginner ASP, the program is able to write out, but if each site page of the revision, all the source program will carry out a transplant operation. To this end, the human energy consumed countless, or even inadvertently gains, naught.
So, dream of
Are you satisfied with the database you designed for yourself? Are you sure you don't want to deal with it? For example, create a new database table, such as creating or modifying a field ... Of course, these are all part of the design database.
So,
Copy Code code as follows:
' The following is the specific code implemented by this calendar algorithm in ASP
' First decide whether to specify a year and month, no to display according to the current year and month
If Request
A little summary: the operation of the database is nothing but
displays records, inserts records, modifies records, deletes records, and queries records.
And when it comes to displaying records, it's also about
display output format, paging
One, the picture into the databaseUse the following knowledge in several aspects:1. Using streaming objects2. Find the size and type of pictures you want to upload3. How to use the InputStream method
necessary conditions for inserting picturesThe
Copy Code code as follows:
Db= "Market.asp" is changed to your database address
Set Conn=server.createobject ("Adodb.connection")
Connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" &server.mappath (db)
Conn.Open ConnStr
Conn.execute ("
Strict Control session
You can move content that does not require a session (such as Help screen, visitor area, and so on) to a stand-alone ASP application that closes the session. On the underlying page, you can give the ASP an indication that it
This morning in the foreigner's blog to see this statement, may wish to pay attention to:
If you use FormsAuthentication in asp.net 2.0 and you set the cookie to a persistent state, the duration defaults to 30 minutes, not the 50 in ASP.net 1.1,
asp.net WEB FORMS provides developers with an excellent event-driven development model. However, this simple application development model brings us some minor problems, for example, in a traditional ASP application, you can easily transfer one
FSO In addition to the drive, folder operation, the most powerful function is the operation of the file. It can be used for counting, content management, searching, generating Dynamic HTML pages, and so on.
first, FSO. OpenTextFile
Needless to say,
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