Validating User Input Against a Value Through the CompareValidator Control (VB.net) : CompareValidator « Validation by Control « ASP.Net






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

1.Validating User Input against the Value in Another Control Using the CompareValidator Control (VB.net)
2.Comparevalidator: equal (VB.net)
3.asp:CompareValidator Demo (VB.net)
4.Set CompareValidator to Today