如何在此方案中使用comparevalidator

时间:2013-06-08 18:17:37

标签: asp.net

当我从第二个文本框中取出光标时,我想比较这两个文本框,我该怎么办?

    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
    <asp:CompareValidator ID="CompareValidator1" Display="dynamic"
     ControlToValidate="TextBox3"
     ControlToCompare="TextBox4" 
     ForeColor="red" 
     BackColor="yellow" 
     Type="String"
     EnableClientScript="false" 
     Text="Password does not match!" 
     runat="server" />

0 个答案:

没有答案