Validating User Input Against a Value Through the CompareValidator Control (VB.net)
<%@ Page Language=VB Debug=true %>
<HTML>
<HEAD>
<TITLE>Validating User Input Against a Value Through the CompareValidator Control</TITLE>
</HEAD>
<form runat="server">
<BR><BR>
What is the next generation of ASP called?<BR>
<asp:textbox
id="txtAnswer"
runat=server
/>
<asp:CompareValidator id="cvCheckAnswer"
ControlToValidate="txtAnswer"
ValueToCompare="ASP.NET"
runat=server>
Incorrect Answer!
</asp:CompareValidator>
<BR><BR>
<asp:button
id="butOK"
text="OK"
type="Submit"
runat="server"
/>
</form>
</BODY>
</HTML>
Related examples in the same category