If you want to implement HTTP://WWW.KNOWSKY.COM/HELLO.ZW also use ASP syntax to execute, we still need some extra work.
To allow requests for files with a suffix named. ZW to be run by our handler intercept
Open the admin console for IIS, click
HTML tag is a kind of complex things, we generally do not filter the current use is to operate, there is a need to learn students can refer to this article.
The code is as follows
Option ExplicitFunction striphtml
Program code
' function: Definition converted to JavaScript string output (in convention JavaScript, quoted strings in single quotes)' Source: http://www.cncms.com/asp.asp
Function Str4js (sstring)STR4JS = sstringIf IsNull (sstring) Then str4js = "
Program code
' function: To determine whether a value exists in an array' Source: http://www.cncms.com/asp.asp
Function InArray (svalue, Aarray)Dim xInArray = FalseFor each x in AarrayIf x = svalue ThenInArray = TrueExit forEnd IfNextEnd Function%>
Normal substitution function
The code is as follows:Public function Highlight (s,f)Dim tl,tm,tr,kTl= ""Tm= ""Tr=sK=instr (1,tr,f,1)Do While k>0Tl=tl & Left (tr,k-1)Tm=mid (Tr,k,len (F))Tl=tl & "" & TM & ""Tr=right (Tr,len (TR)-len (F)-k+1)K=instr (1
This is an ASP tutorial delete the specified record program code Oh, the instance by clicking Connect to delete the page, and execution deletes,
Database Tutorial ConnectionsSub Opendb ()Set Rs=server. CreateObject ("Adodb.recordset")Set
Note: This event, write not write on is the same. Like Application_End and Application_OnEnd are the same
The application usage in asp.net is the same as the ASP, almost nothing to say, but it has two more particularly useful events,
The method needs to pass the encoding of the target page, such as System.Text.Encoding.Default or System.Text.Encoding.UTF8.
If any expert knows how to automatically determine the encoding format of the target page, please tell in the comments.
Use ASP.net to realize the text watermark, here introduces a simple method, although simple, but feel very practical, and asp.net novice also easy to understand, easy to modify and perfect. Here's the code, followed by a description of how to use:
This article mainly describes the way to replace a asp.net control with a custom control, which you need to refer to in the following Function: You can replace a asp.net control with a custom control pages tagmapping element (asp.net setup
This article mainly introduced the ASP.net page adds the user control the method, needs the friend to be possible to refer to underOne: Add the registration control code to the foreground of the page as follows: Two: on the page need To add a
To configure the database connection string in Webconfig, the code is as follows:
Copy Code code as follows:
Then get the connection string inside the Webform_1.aspx.cs to add the following reference;
Copy Code code as follows:
using
Now most of the mail to be validated, I write this article is to help you develop projects, and I hope you can give me some advice.
Refer the JMail to the project and join the JMail namespace, where I will refer to the MessageClass class of the
When we write ASP database programs, we usually use SQL statements, and when we add data and update the data, we usually use the way: INSERT into message (Incept,sender,title,content,sendtime, Flag,issend) VALUES (' "&incept (i) &", ' &membername& "'
Dim conn,rs;//Here, if you call an external file, you must define it here.This is the database creation connection method
Sub Opendb ()Set Rs=server. CreateObject ("Adodb.recordset")Set Conn=server. CreateObject
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