File: web_comparevalidator.aspx

package info (click to toggle)
xsp 4.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 5,168 kB
  • ctags: 2,422
  • sloc: cs: 13,500; sh: 12,082; xml: 8,279; makefile: 650; perl: 619; ansic: 299; php: 6
file content (35 lines) | stat: -rw-r--r-- 960 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%@ Page Language="C#" %>
<%@ Register TagPrefix="mono" TagName="MonoSamplesHeader" src="~/controls/MonoSamplesHeader.ascx" %>
<html>
<script runat="server">
void Check_Click(Object src, EventArgs E) {
	message.Text = "Entered data is " + (Page.IsValid ? "valid." : "invalid!");
}
</script>

<head>
<link rel="stylesheet" type="text/css" href="/mono-xsp.css">
<title>CompareValidator</title>
</head>

<body><mono:MonoSamplesHeader runat="server"/>
<form runat="server">
<asp:Label text="Enter twice the same string:" runat="server"/><br>
<asp:TextBox id="Text1" runat="server" /> ==
<asp:TextBox id="Text2" runat="server" />
<asp:CompareValidator runat="server"
	EnableClientScript="true"
	ControlToValidate="Text1" ControlToCompare="Text2" Operation="Equal"
	ErrorMessage="Strings do not match!"/><br />
	
<br />

<asp:Button text="Check" onclick="Check_Click" runat="server"/><br/ >

<br />

<asp:Label id="message" runat="server"/>
</form>
</body>
</html>