Click here to Skip to main content
Rate this: bad
good
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 at 5-Feb-13 7:45am
   
What is the question? What exactly isn't working? What have you tried? Improve your question.
Sandeep Mewara at 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
0 OriginalGriff 250
1 Sergey Alexandrovich Kryukov 184
2 Rob Philpott 100
3 jlopez788 74
4 CHill60 70
0 OriginalGriff 6,837
1 Sergey Alexandrovich Kryukov 5,589
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
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