📄 customv.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customv.aspx.cs" Inherits="_Default" %>
<!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>无标题页</title>
<style type="text/css">
.td
{
border-bottom:dotted 1px #dcdcdc;
border-right:dotted 1px #dcdcdc;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="border:solid 1px green;width:40%">
<tr>
<td style="background-color:Green" >
<strong><span style="font-size: 14pt; color: #ffffff">验证是否为偶数(CustomValidator控件)</span></strong></td>
</tr>
<tr>
<td class="td">
请输入一个数字:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="请输入偶数" ClientValidationFunction="validation" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator></td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="判断是否为偶数" />
<asp:Label ID="lab" runat="server" ForeColor="#C00000"></asp:Label></td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -