web form 服务器控件表单验证
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ValidationDemo.aspx.cs" Inherits="Validation.ValidationDemo" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td>Name:</td>
<td>
<asp:TextBox ID="TextName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextName"
ErrorMessage="Name required">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Email:</td>
<td>
<asp:TextBox ID="TextEmail" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="TextEmail" Display="Dynamic"
ErrorMessage="Email required">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="TextEmail" Display="Dynamic"
ErrorMessage="Please enter an email"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Register" />
</td>
<td> </td>
</tr>
</table> </div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</form>
</body>
</html>
web form 服务器控件表单验证的更多相关文章
- 【开发】Form Validate 表单验证 扩展应用
目录: ★.文本输入框(easyui-textbox) ★.数字框(easyui-numberbox) ★.时间(easyui-datebox) ★.文本域(easyui-textbox easyui ...
- [php基础]PHP Form表单验证:PHP form validator使用说明
在PHP网站开发建设中,用户注册.留言是必不可少的功能,用户提交的信息数据都是通过Form表单提交,为了保证数据的完整性.安全性,PHP Form表单验证是过滤数据的首要环节,PHP对表单提交数据的验 ...
- jQuery学习之:Validation表单验证插件
http://polaris.blog.51cto.com/1146394/258781/ 最近由于公司决定使用AJAX + Struts2来重构项目,让我仔细研究一下这两个,然后集中给同事讲讲,让每 ...
- ASP.NET 表单验证实现浅析
首先,自然是配置 Web.config,在 <system.web> 下设定: <authentication mode="Forms"> <form ...
- yii框架中应用jquery表单验证插件
效果图: 视图层: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w ...
- Webx之表单验证
引入服务器端表单验证service,是通过在webx.xml中通过服务引入的方式完成的.例如,在user相关信息的表单验证的产生过程是这样的:webx-user.xml通过 <beans:imp ...
- HTML5 web Form表单验证实例
HTML5 web Form 的开发实例! index.html <!DOCTYPE html> <html> <head> <meta charset=&q ...
- web框架-(六)Django补充---form表单验证
一.form表单验证 1. 常规html页面的form表单验证 常规页面中,如果想实现对表单中用户输入信息的数据验证,需要配合Ajax来实现. 使用前我们先来熟悉下函数参数:request,其中包含的 ...
- HTML5 Web Form 新增属性和表单验证
<form>标签的基本属性 method属性:指定浏览器向服务器传送数据的方式,可选: action属性:设置服务器接受和处理表单数据的URL: enctype属性:制定表单数据在发送到服 ...
随机推荐
- *#【Python】【基础知识】【模块】【datetime】【使用datetime模块 】
datetime模块 的介绍: 用于调取时间.日期 datetime包含的 方法: >>> dir(datetime) ['MAXYEAR', 'MINYEAR', '__built ...
- DDL数据库对象管理
DDL数据库对象管理 约束的分类: 主键约束:primary key 要求主键列数据唯一,并且不允许为空. 外键约束:foreign key 用于在两表之间建立关系,需要指定引用主表的哪一列. 检查约 ...
- 搭建Leanote笔记
mongo\leanote #查询Linux开放的端口 netstat -nupl (UDP类型的端口) netstat -ntpl (TCP类型的端口) #下载安装MongoDB wget http ...
- LC 416. Partition Equal Subset Sum
题目 Given a non-empty array containing only positive integers, find if the array can be partitioned i ...
- Python 【函数】
函数 内置函数print() input() len() type() ... print('Hello World') 函数 参数 定义函数def greet(name): print(name+' ...
- Pygame小游戏练习五
@Python编程从入门到实践 Python项目练习 十一.显示游戏得分及最高分 创建新类Scoreboard,用以显示得分和最高分. # scoreboard.py import pygame.fo ...
- Python 第二式
@Codewars Python练习 question ** Simple transposition ** Simple transposition is a basic and simple cr ...
- mac电脑上从终端命令行进入电脑里U盘目录下
一般Mac电脑上u盘都在 Volumes 目录下,所以进入u盘可按如下命令: cd /Volumes/u盘名称
- C#字典转对象
/// <summary> /// Assign parameters to specified objects /// </summary> /// <typepara ...
- C++反汇编第四讲,认识多重继承,菱形继承的内存结构,以及反汇编中的表现形式.
目录: 1.多重继承在内存中的表现形式 多重继承在汇编中的表现形式 2.菱形继承 普通的菱形继承 虚继承 汇编中的表现形式 一丶多重继承在内存中的表现形式 高级代码: class Father1 { ...