当前位置:编程学习 > C#/ASP.NET >>

多个RequiredFieldValidator同时验证的顺序

我现在有三个RequiredFieldValidator,验证三个DropDownList不为空,我想在点击按钮的时候一个一个的验证,如果是三个都为空,点击按钮,不要同时显示三条不能为空的信息。先提示第一个DropDownList不能为空,然后点按钮,如果第二个DropDownList为空再提示第二个不能为空,这样,就是想能不能设定一个验证的先后顺序,这样看起来显得不那么乱,请教,是否可以设置? --------------------编程问答-------------------- 没有高人么? --------------------编程问答-------------------- <asp:TextBox ID="txtInputMember" ValidationGroup="abc" runat="server" MaxLength="2000" CssClass="con2 EmployeeSelect"
    EnableTheming="false"></asp:TextBox>
<asp:RequiredFieldValidator ValidationGroup="abc" ID="rfvtxtInputMember" runat="server" ControlToValidate="txtInputMember"
    ErrorMessage="*" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
  <asp:Button ID="btnPCR" runat="server" Text="按钮" OnClick="btnPCR_Click" ValidationGroup="abc" />
设置 ValidationGroup --------------------编程问答-------------------- 你的意思是一个Button对应一个验证控件是吧,
但是我现在只有一个Button,要对应三个验证控件。。。 --------------------编程问答-------------------- 悲剧啊,这可如何是好。 --------------------编程问答-------------------- --------------------编程问答-------------------- 怎么这个问题没人知道呢,我也想知道怎么做,刚好遇到相同的情况 --------------------编程问答-------------------- 这种。。一般写js判断了 --------------------编程问答-------------------- 风掉 拉啊啊
补充:.NET技术 ,  组件/控件开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,