Get QueryString
Parameter name
return value
public string Q (string s)
{
if (Request.querystring[s]!= null)
{
Return Request.querystring[s]. ToString ();
}
return string. Empty;
}
Get the parameters that the post gets
Parameter name
Replace special characters in HTML
Text that needs to be replaced.
Replace the finished text.
public string HtmlEncode (string thestring)
{
Thestring=thestring.replace (">", ">");
Thestring=thestring.replace ("Thestring=thestring.replace ("", ""
First, create a new resx resource file in App_GlobalResources. Such as:
Items in ResX in different languages should have the same name:
Chinese resource items
English resource items
After that, you can use these name values.
Copy
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Collections;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using
First look at the interface:
After adding the database:
And the statement to execute:
Copy Code code as follows:
String name_ = This.tbxUseName.Text.Trim ();
String webname_ = This.tbxWebName.Text.Trim ();
String url_ =
1. It is not recommended to support ASP.net on the server where the host is installed because ASP.net has a large number of unknown security issues.
2. If a user needs to write a file or directory using ASP.net, the following permissions need to
Here, our site directory in the D disk of the WWW folder, assuming that there is a virtual host named Fesend user, we are in the WWW folder to create a Fesend folder to store this user's site data
The following groups and accounts are used:
1. Building Database Tables
Table name is online
Set the following fields
Id ' is used to record the Session.SessionID of each visit.
Name ' If it is a visitor, it is recorded as a visitor.
Online ' If is to visit each 0 if it is a member
In fact, the static page here is not a true sense of static, but can reach the static page parsing efficiency, but also without project testing, to share.
Copy Code code as follows:
Const devjs_index= "Index.html"
Const
Now there is an XML that has the following format:
Copy Code code as follows:
1
ABC
2
CDE
3
EFG
I use ASP query id=2, enter the value of the corresponding name, how can I write?
In ASP (VBScript as language), the ASC function returns a value less than 0 and can be judged as a Chinese character. The ASC function returns the ANSI character code corresponding to the first letter of the string.
Copy Code code as follows:
'******************************
' Function: Makepassword (ByVal maxlen)
' Parameter: maxlen, the length of the number of password digits to be generated
' Author: Arisisi
' Date: 2007/7/12
' Description: Generate arbitrary digits of random passwords
by macro limit, the file must exist and will be precompiled (regardless of whether the preceding conditions are preceded)
Often there are requirements to include different files according to different requirements, such as individual settings, so
Get the capital pinyin of the first word in Chinese sentence
'******************************
' Function: Getpychar (char)
' parameter: Char, any Chinese character or sentence
' Author: Arisisi
' Date: 2007/7/15
' Description: Get a capital pinyin of
'******************************
' Function: IsValidUserName (byVal UserName)
' Parameter: UserName, user name
' Author: Arisisi
' Date: 2007/7/15
' Description: Verify that the username contains illegal characters and does not contain illegal
'//Data Processing Section
Dim Content,num,i,strcodea
I=request ("I")
If Len (I) =0 then i=0
Response.Write " The program has now been looping through the" &I& "secondary data "
Strcodea= ' uploadfiles/news '//need to query for strings
When the address bar has no parameter "id":
Copy Code code as follows:
request.querystring["ID"] = = NULL
Convert.ToString (request.querystring["ID"]) = = NULL
Note that this can be an error:
request.querystring["ID"]. ToString
If saving a Dictionary object at the session level lowers the performance of the system, and saving a Dictionary object at the application level can cause the Web server to crash, that's not much to say.
Now we want to consider the dictionary
Program code:
The following are the referenced contents:
Copy Code code as follows:
' Search for keywords
Str= "SELECT * FROM tablename where id>4"
If srhkey<> "" Then
Keyarr=split (Srhkey, "")
J=ubound (Keyarr)
T=0
Dim Keystrarr ()
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