Click here to Skip to main content
12,292,976 members (67,117 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET
hai i have

one simple radio buttion list like this

<td>
                            <asp:RadioButtonList ID="rb_Question1" runat="server" ValidationGroup="req" Height="16px"
                                RepeatColumns="2" Width="220px"    >
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="0"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>



when user click on the No button based on no button Textbox comments will be required

my textbox is as follows





<tr>
                        <td align="right"><b>Comments:</b></td>
                        <td colspan="2" class="row">
                            <div class='textAreaDiv'>
                                <asp:TextBox ID="ReviewerDecsion_txt" class="border" runat="server" TextMode="MultiLine" Width="800px" Height="120px"></asp:TextBox>
                                <asp:CustomValidator ID="cv_ReviewerDecsion_txt" runat="server"  ValidateEmptyText="true"
 
                                ClientValidationFunction="ReviewerDecsiontxt" ErrorMessage="Enter text for Approve this applicant to become a surveyor?"
                                ForeColor="Red" Text="*"  ValidationGroup="req"></asp:CustomValidator>
                            </div>
                        </td>


i WANT cUSTOMER Validation for this


my scirpt is as follows it is not working


function ReviewerDecsiontxt(sender, args) {
            var radbtn1 = $("#cphMaster_rb_Question1_0");
            var radbtn2 = $("#cphMaster_rb_Question1_1");
            var ReviewerTxtbox = $("#ReviewerDecsion_txt");
            if ((radbtn1[0].checked ) &&(ReviewerTxtbox.text)!= "")
            { args.IsValid = true; }
            else { args.IsValid = false; }
 
               }
Posted 5-Feb-13 0:26am
(unknown member)
Comments
sjelen 5-Feb-13 7:45am
   
What is the question? What exactly isn't working? What have you tried? Improve your question.
Sandeep Mewara 5-Feb-13 12:48pm
   
Are you getting correct objects in your jQuery? What do you see in debug?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100