-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: MockRaviEverGreen
Message 1 in Discussion


hai everybody iam ravi

in my page i used 4 controls so for each control i have to write separate functions 
this is very
burden for me so instead of this how can i write the code that will we useful to all 
the controls by using custom validator. according to my knowledge we done
one function for all controls to check the even number and then apply that in a custom 
validator,the code is as follows.using the following 
code how can i change my script to valid all the controls for countries.




         language="javascript">
                function checkeven(obj,Args)
                {
                        if(     Args.Value%2==0)
                                Args.IsValid=true;
                        else
                                Args.IsValid=false;
                }
                                
                </script>

<asp:CustomValidator id="CustomValidator1" runat="server" Width="194px" Height="33px" 
ErrorMessage="not an even number" ControlToValidate="TextBox2" 
ClientValidationFunction="checkeven"></asp:CustomValidator>

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to