注册表中的validatin问题 [英] validatin problem in registration Form
本文介绍了注册表中的validatin问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在项目验证中遇到问题我想为每个控件编写验证,并且应该在每个控件下面显示消息读取我想要客户端java脚本验证注册表单
plz give我解决方案....
I have the problem in validation in my project i want to write Validation for each control and message should be displayed below each control in read i want client side java script validation for registration form
plz give me solution....
推荐答案
这些是给你的..
http://www.developerscode.com/2011/02/client-side-validations-using.html [ ^ ]
用户注册的ASP.NET验证控制 [ ^ ]
http://www.aspdotnet-suresh.com/2010/10/javascript-validations-to-validate-form.html [ ^ ]
http://www.c- sharpcorner.com/UploadFile/purankaushal/103222006013805AM/1.aspx?ArticleID=10c0cce3-e00f-4dad-9ddb-df0c669afd6c [ ^ ]
These are for you..
http://www.developerscode.com/2011/02/client-side-validations-using.html[^]
ASP.NET Validation Control for User Registration [^]
http://www.aspdotnet-suresh.com/2010/10/javascript-validations-to-validate-form.html[^]
http://www.c-sharpcorner.com/UploadFile/purankaushal/103222006013805AM/1.aspx?ArticleID=10c0cce3-e00f-4dad-9ddb-df0c669afd6c[^]
Hello Sir ,
这是Abhinavsingh993有很多可能的方法进行验证我在这里给你javascriptsummary验证方法,因为它是经过高度测试和从我的运行大学项目引用
----- -------------------------------------------------- ------------------------------------
------ -------------------------------------------------- ---------------------------------
你好先生,
这是Abhinavsingh993有很多可能的方法进行验证我在这里给你javascriptsummary验证方法,因为它是经过高度测试和从我的运行大学项目引用
----- -------------------------------------------------- ------------------------------------
------ -------------------------------------------------- ---------------------------------
<%@ Page Language =C# AutoEventWireup =trueCodeBehind =EmployeeRegistration.aspx.csInherits =Assignment10.EmployeeRegistration%>
<!DOCTYPE html PUBLIC - / / W3C // DTD XHTML 1.0 Transitional // ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
< html xmlns =http:// www .w3.org / 1999 / xhtml>
< head runat =server>
< title> Assign10 by Abhinav< / title>
< link id =Link1runat =server =快捷图标href =favicon.icotype =image / x-icon/>
< style type =text / css>
.style1
{
宽度:100%;
}
.style2
{
宽度:456px;
}
.style3
{
宽度:231px;
}
< / style>
< script language =javascripttype =text / javascript>
//验证的摘要函数
函数validate(){
var summary =;
摘要+ = isvalidfirstname();
摘要+ = isvalidmiddlename();
summar y + = isvalidlastname();
摘要+ = isvalidfathername();
摘要+ = isvalidmothername();
摘要+ = isvalidEmail( );
摘要+ = isvalidphoneno();
摘要+ = isvalidaltphoneno();
摘要+ = isvalidaltEmail();
摘要+ = isvalidaddress();
if(summary!=){
alert(summary);
返回false;
}
else {
返回true;
}
}
///移动名称的验证功能
函数isvalidphoneno(){
var uid;
var temp = document.getElementById(<%= txtmobile.ClientID%>);
uid = temp。价值;
var;
re = / ^ [0-9] +
Hello Sir,
This is Abhinavsingh993 There are many possible way for the validation among them I am here giving you the javascriptsummary validation method since it is highly tested and a referenced from myone running college project
-------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
Hello Sir,
This is Abhinavsingh993 There are many possible way for the validation among them I am here giving you the javascriptsummary validation method since it is highly tested and a referenced from myone running college project
-------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmployeeRegistration.aspx.cs" Inherits="Assignment10.EmployeeRegistration" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Assignment10 by Abhinav</title>
<link id="Link1" runat="server" rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 456px;
}
.style3
{
width: 231px;
}
</style>
<script language="javascript"type="text/javascript">
//The Summary Function for the Validations
function validate() {
var summary = "";
summary += isvalidfirstname();
summary += isvalidmiddlename();
summary += isvalidlastname();
summary += isvalidfathername();
summary += isvalidmothername();
summary += isvalidEmail();
summary += isvalidphoneno();
summary += isvalidaltphoneno();
summary += isvalidaltEmail();
summary += isvalidaddress();
if (summary != "") {
alert(summary);
return false;
}
else {
return true;
}
}
///The Validation function of the Mobile Name
function isvalidphoneno() {
var uid;
var temp = document.getElementById("<%=txtmobile.ClientID %>");
uid = temp.value;
var re;
re = /^[0-9]+
/;
var digits = / \d( 10)/;
if(uid ==){
return(请输入主要手机号码+\ n);
}
否则如果(re.test(uid)){
返回;
}
else {
return(你的手机号码只能是数字+\ n);
}
}
//姓氏验证字段
函数isvalidlastname(){
var uid;
var temp = document.getElementById(<%= txtlastname.ClientID%>);
uid = temp.value;
var re = / ^ [a-zA-Z] +
/;
var digits = /\d(10)/;
if (uid == "") {
return ("Please enter Primary Mobile Number " + "\n");
}
else if (re.test(uid)) {
return "";
}
else {
return ("Your Mobile Number should be in digits only" + "\n");
}
}
//The Last name Validation Field
function isvalidlastname() {
var uid;
var temp = document.getElementById("<%=txtlastname.ClientID %>");
uid = temp.value;
var re = /^[a-zA-Z ]+
这篇关于注册表中的validatin问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文