为什么没有结果???
<script language="vb" runat="server">
sub check(s as object,e as eventargs)
if page.isvalid then
l1.text="有效!"
else
l1.text="无效!"
end if
end sub
sub change(s as object,e as eventargs)
comv.operator=lbox.selecteditem.value
comv.validate
end sub
</script>
<form id="Form1" method="post" runat="server">
<asp:TextBox ID=t1 Runat=server></asp:TextBox>
<asp:ListBox ID=lbox Runat=server OnSelectedIndexChanged=change>
<asp:ListItem Value="lessthan"><</asp:ListItem>
<asp:ListItem Value="lessthanequal"><=</asp:ListItem>
<asp:ListItem Value="greaterthan">></asp:ListItem>
<asp:ListItem Value="greaterthanequal">>=</asp:ListItem>
<asp:ListItem Value="equal">=</asp:ListItem>
<asp:ListItem Value="notequal"><></asp:ListItem>
</asp:listbox>
<asp:TextBox ID=t2 Runat=server></asp:TextBox>
<asp:CompareValidator ID=comv Runat=server ControlToValidate=t1
ControlToCompare=t2 type=string></asp:CompareValidator>
<asp:Button Runat=server OnClick=check Text="确定"></asp:Button>
<asp:Label ID=l1 Runat=server></asp:Label>
</form>