sp; Font-Size="10pt" runat="server"/> </form> </body> </html>
C#
<%@ Page Language="C#" AutoEventWireup="True" %> <html> <head> <script runat="server"> void Button_Click(Object sender, EventArgs e) { if (Page.IsValid) { lblOutput.Text = "Result: Valid!"; } else { lblOutput.Text = "Result: Not valid!"; } } void Operator_Index_Changed(Object sender, EventArgs e) { Compare1.Operator = (ValidationCompareOperator)ListOperator.SelectedIndex; Compare1.Validate(); } void Type_Index_Changed(Object sender, EventArgs e) { Compare1.Type = (ValidationDataType)ListType.SelectedIndex; Compare2.Type = (ValidationDataType)ListType.SelectedIndex; Compare1.Validate(); } </script> </head> <body> <form runat="server"> <h3>CompareValidator Example</h3> |