c# - customvalidator onServerValidate not firing -


i have radio button list , text box both validation.

<asp:radiobuttonlist id="member" runat="server" repeatdirection="horizontal">     <asp:listitem>yes</asp:listitem>     <asp:listitem>no</asp:listitem> </asp:radiobuttonlist>  <asp:requiredfieldvalidator id="unionvalidator" runat="server" controltovalidate="member" errormessage="required" />  required if member == "yes"  <asp:textbox runat="server" id="union"></asp:textbox> <asp:customvalidator id="customvalidator1" runat="server" validateemptytext="true" onservervalidate="unionvalidate" errormessage="your current union required"  /> 

my servervalidate doesn't fire @ all.

public void unionvalidate(object source, servervalidateeventargs args) {     if (member.text == "yes" && union.text.trim() == "")         args.isvalid = false; } 

are calling page.validate() method somewhere in code behind or submit button has causesvalidation set true?


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -