1. DateTime digital type
currentTime=new ();
1.1 Take the current year, month, day, hour, minute, and second
currentTime=;
1.2 Take the current year
int year=;
1.3 Take the current month
int month=;
1.4 Take the current day
int day=;
1.5 Get the current time
when int =;
1.6 Get the current score
int points =;
1.7 Take the current second
int seconds=;
1.8 Take the current milliseconds
int milliseconds =;
(Variables are available in Chinese)
2. (Variable) ("Constant")
Character conversion to 32-bit numeric
3. Variable.ToString()
Character conversion to string
("n"); // Generate 12,345.00
("C"); //Generate ¥12,345.00
("e"); //Generate 1.234500e+004
("f4"); //Generate 12345.0000
("x"); //Generate 3039 (hexadecimal)
("p"); //Generate 1,234,500.00%
4. Variable.Length numerical type
Take the string length:
For example: string str="China";
int Len = ; //Len is a custom variable, str is the variable name of the string to be tested
5. (Variable)
Word code conversion to bitcode
For example: byte[] bytStr = (str);
Then you can get the bit length:
len = ;
6、("")
Add strings (Is the + sign the same?)
For example: sb = new ("");
("China");
("people");
("Republic");
7. Variable.Substring(parameter 1, parameter 2);
Intercept part of the string, parameter 1 is the number of left starting digits, and parameter 2 is the number of intercepted digits.
For example: string s1 = (0,2);
8、String user_IP=["REMOTE_ADDR"].ToString();
Get the remote user IP address
9. Go through the proxy server to get the real IP address of the remote user:
if(["HTTP_VIA"]!=null){
string user_IP=["HTTP_X_FORWARDED_FOR"].ToString();
}else{
string user_IP=["REMOTE_ADDR"].ToString();
}
10. Session["variable"];
Access Session value;
For example, assignment: Session["username"]="Bash Jr.";
Value: Object objName=Session["username"];
String strName=();
Clear: ();
11. String str=["variable"];
Use hyperlink to transfer variables.
For example, build a hyperlink on any page: <a href=?fbid=23>Click</a>
Take the value in the page: String str=["fdid"];
12. DOC object.CreateElement("New node name");
Create a new XML document node
13. Parent node.AppendChild (child node);
Add the newly created child node to the parent node of the XML document
14. Parent node.RemoveChild(node);
Delete nodes
15、Response
("string");
(variable);
Output to the page.
("URL Address");
Jump to the page specified by the URL
16. (String variable, number of bits) - Logical type
Check whether the specified position is empty;
like:
string str="Chinese people";
((str,2)); //The result is: True, the first character is 0 bits, and 2 is the third character.
17. ('character') --logical type
Check whether characters are punctuation marks
For example: (('A')); //Return: False
18. (int)'character'
Turn characters into numbers, check code points, and pay attention to single quotes.
like:
((int)'Medium'); //The result is a Chinese word code: 20013
19. (char) code
Turn numbers into characters and check the characters represented by the code.
like:
((char)22269); //Return to the word "country".
20、 Trim()
Clear the spaces before and after the string
21. String variable.Replace("substring","replace with")
String replacement
like:
string str="China";
str=("Guo","Yang"); //Replace the character "Guo" with the character "Yang"; //Replace the character "Guo" with the character "Yang"); //
(str); //The output result is "central"
Another example: (This is very practical)
string str="This is a <script> script";
str=("<","<font><</font>"); //Replace the left angle bracket with <font> and < and </font> (or replace it with <, but it is estimated that after the XML is stored, it will still be restored if it is proposed)
(str); //Show as: "This is a <script> script"
If not replaced, <script> will not be displayed, if it is a script, it will be run; and after replacement, the script will not be run.
The value of this code is: you can invalidate all HTML tags in a text and display them all, protecting your interactive site.
Specific implementation: Add the following code to your form submit button script:
string strSubmit=; //label1 is the control ID that you ask the user to submit data.
strSubmit=("<","<font><</font>");
Then save or output strSubmit.
This method can also be used to implement UBB code simply.
22、(i,j)
Take the maximum value between i and j
If int x=(5,10); // x will take the value 10
currentTime=new ();
1.1 Take the current year, month, day, hour, minute, and second
currentTime=;
1.2 Take the current year
int year=;
1.3 Take the current month
int month=;
1.4 Take the current day
int day=;
1.5 Get the current time
when int =;
1.6 Get the current score
int points =;
1.7 Take the current second
int seconds=;
1.8 Take the current milliseconds
int milliseconds =;
(Variables are available in Chinese)
2. (Variable) ("Constant")
Character conversion to 32-bit numeric
3. Variable.ToString()
Character conversion to string
("n"); // Generate 12,345.00
("C"); //Generate ¥12,345.00
("e"); //Generate 1.234500e+004
("f4"); //Generate 12345.0000
("x"); //Generate 3039 (hexadecimal)
("p"); //Generate 1,234,500.00%
4. Variable.Length numerical type
Take the string length:
For example: string str="China";
int Len = ; //Len is a custom variable, str is the variable name of the string to be tested
5. (Variable)
Word code conversion to bitcode
For example: byte[] bytStr = (str);
Then you can get the bit length:
len = ;
6、("")
Add strings (Is the + sign the same?)
For example: sb = new ("");
("China");
("people");
("Republic");
7. Variable.Substring(parameter 1, parameter 2);
Intercept part of the string, parameter 1 is the number of left starting digits, and parameter 2 is the number of intercepted digits.
For example: string s1 = (0,2);
8、String user_IP=["REMOTE_ADDR"].ToString();
Get the remote user IP address
9. Go through the proxy server to get the real IP address of the remote user:
if(["HTTP_VIA"]!=null){
string user_IP=["HTTP_X_FORWARDED_FOR"].ToString();
}else{
string user_IP=["REMOTE_ADDR"].ToString();
}
10. Session["variable"];
Access Session value;
For example, assignment: Session["username"]="Bash Jr.";
Value: Object objName=Session["username"];
String strName=();
Clear: ();
11. String str=["variable"];
Use hyperlink to transfer variables.
For example, build a hyperlink on any page: <a href=?fbid=23>Click</a>
Take the value in the page: String str=["fdid"];
12. DOC object.CreateElement("New node name");
Create a new XML document node
13. Parent node.AppendChild (child node);
Add the newly created child node to the parent node of the XML document
14. Parent node.RemoveChild(node);
Delete nodes
15、Response
("string");
(variable);
Output to the page.
("URL Address");
Jump to the page specified by the URL
16. (String variable, number of bits) - Logical type
Check whether the specified position is empty;
like:
string str="Chinese people";
((str,2)); //The result is: True, the first character is 0 bits, and 2 is the third character.
17. ('character') --logical type
Check whether characters are punctuation marks
For example: (('A')); //Return: False
18. (int)'character'
Turn characters into numbers, check code points, and pay attention to single quotes.
like:
((int)'Medium'); //The result is a Chinese word code: 20013
19. (char) code
Turn numbers into characters and check the characters represented by the code.
like:
((char)22269); //Return to the word "country".
20、 Trim()
Clear the spaces before and after the string
21. String variable.Replace("substring","replace with")
String replacement
like:
string str="China";
str=("Guo","Yang"); //Replace the character "Guo" with the character "Yang"; //Replace the character "Guo" with the character "Yang"); //
(str); //The output result is "central"
Another example: (This is very practical)
string str="This is a <script> script";
str=("<","<font><</font>"); //Replace the left angle bracket with <font> and < and </font> (or replace it with <, but it is estimated that after the XML is stored, it will still be restored if it is proposed)
(str); //Show as: "This is a <script> script"
If not replaced, <script> will not be displayed, if it is a script, it will be run; and after replacement, the script will not be run.
The value of this code is: you can invalidate all HTML tags in a text and display them all, protecting your interactive site.
Specific implementation: Add the following code to your form submit button script:
string strSubmit=; //label1 is the control ID that you ask the user to submit data.
strSubmit=("<","<font><</font>");
Then save or output strSubmit.
This method can also be used to implement UBB code simply.
22、(i,j)
Take the maximum value between i and j
If int x=(5,10); // x will take the value 10