Verify the mobile phone number in ASP. net mvc, asp. netmvc
In ASP. net mvc, you can use the RegularExpression feature to verify the mobile phone number.
public class Customer {[Required (ErrorMessage = "Required")][Displ
protected void Button1_Click (object sender, EventArgs e){if (Regex.IsMatch (TextBox1.Text.Trim (), @ "^\d{7,11}$")){String num = TextBox1.Text.Trim (). Substring (0, 7);DataRow dr = DAL.oledb.ExecuteDataRow ("Db.mdb", "SELECT * from list where num =?", num);if (dr! = null){Response.Write (TextBox1.Text.Trim () + "}}}ASP. NET implementation of mobile phone number
protected void Button1_Click (object sender, EventArgs e){if (Regex.IsMatch (TextBox1.Text.Trim (), @ "^\d{7,11}$")){String num = TextBox1.Text.Trim (). Substring (0, 7);DataRow dr = DAL.oledb.ExecuteDataRow ("Db.mdb", "SELECT * from list where num =?", num);if (dr! = null){Response.Write (TextBox1.Text.Trim () + "}}}ASP. NET implementation of mobile phone number
application can be obtained through the getPackageName () method of Activity or Context (Activity inherited from Context). However, many settings can be added, usually set to 0. Finally, the PackageManager object is obtained. The Context object provides the getPackageManager () method to obtain the object. In summary, the template code is as follows: (Note that the encapsulated method is located in an Activity, so this is used directly to replace the Context object) 1/** 2 * Get version 3 * @ r
scenes, a good safety net to buy it?
For the above issues, well-known information security manufacturers Kaspersky remind the vast number of Internet users in the network shopping, especially the more attractive network activities, the first to identify the organizer of true and false, lest mistakenly into the fishing site, and then install professional securit
login from four different perspectives, hoping to provide some inspiration for the construction of more perfect banking institutions, and find some ideas or inspirations to further improve the security of online bank login. In order to provide some suggestions for the construction of the Internet bank information, it is not clear enough for the safety construction. As Bai Rei, a senior Green Alliance technology Security advisor, said:
"The practice
continuously allocated in memory, such as array, List.4. IQueryableThe main and IEnumerable interfaces are compared here.The parameter of the implementation method in enumerable is the Func delegate, and the parameter of the method implemented in the queryable is an expression.Both implementations IQueryable and Ienumabler are deferred loads, but they are implemented in different ways, the former is the iterator pattern, the parameter is the Func delegate, and the latter is the expression tree
need the following [3|4|5|8| 9][0-9] represents any number in the middle of 0-9, which can be 0 or 9\d{4,8} This \d, like [0-9], is a number in the middle of 0-9. {4,8} represents the highest 8 digits of the previous minimum 4-digit number. Why here is not the direct 8, because the cell phone
Verify that the account is validVerification rules: a combination of letters, numbers, and underscores. It must start with a letter and contain 4-16 characters.
FunctionCheckuser (STR ){VaRRe=/^ [A-Za-Z] \ W {3, 15} $/;If(Re. Test (STR) {alert ("Correct");}Else{Alert ("Error") ;}} Checkuser ("jiade_cnblogs");//Call
Verify mobile phone numberVerification rules: 11-digit number, starting with 1.
Funct
");//calledVerify MailboxValidation rules: Leave your email address in the "first part @ Second part"The first part: By letter, number, underline, short line "-", Dot "." CompositionPart two: For a domain name, the domain name consists of letters, numbers, short-term "-", the domain name suffix,and the domain name suffix is generally. xxx or. xxx.xx, a domain name suffix is generally 2-4-bit, such as cn,com,net
}$/; if (Re.test (str)) { alert ("correct"); } else{ alert ("Error");} } Checkphone ("09557777777");//CallVerify MailboxValidation rules: Leave your email address in the "first part @ Second part"The first part: By letter, number, underline, short line "-", Dot "." CompositionPart two: For a domain name, the domain name consists of letters, numbers, short-term "-", the domain name suffix,and the domain name suffix is generally.
)) {
alert (' identity card number filled in error ');
return false;
}
Detailed version of ID card verification:
Http://www.jb51.net/article/88771.htm
3.js verification of mobile phone number
China's mobile phone number
1. Account numberRules: Letters, numbers, underscores, letters beginning with 4-16 digits.Expression:/^[a-za-z]\w{3,15}$/;2. Mobile phone numberRule: 11 digits, starting with 1Expression:/^1\d{10}$/3. Phone numberRules: Area code + number, area code starts with 0, 3-bit or 4-digit number consists of 7-or 8-digit number
Jquery implements the number selection method for mobile phone numbers. jquery implements mobile phone numbers
This example describes how to select a mobile phone number using jquery. Share it with you for your reference. The details are as follows:
Some time ago I saw that
This article describes the PHP implementation of the replacement of mobile phone number between the number of * and hidden IP last few methods. Share to everyone for your reference, specific as follows:
$string = "13826589549";
$pattern = "/(\d{3}) \d\d (\d{2})/";
$replacement = "\$1****\$3";
Print Preg_replace ($pattern, $replacement, $string);
Re
rules: Leave your email address in the "first part @ Second part"The first part: By letter, number, underline, short line "-", Dot "." CompositionPart two: For a domain name, the domain name consists of letters, numbers, short-term "-", the domain name suffix,and the domain name suffix is generally. xxx or. xxx.xx, a domain name suffix is generally 2-4-bit, such as cn,com,net, now the domain name will be m
The mobile phone sends the verification code -.net and the verification code. net.
The verification code sent by SMS is as follows:
(1) The user submits a mobile phone number and applies for the verification code of the Lake District
(2) The website generates a verification
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.