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"
 
<pre>
                            ClientValidationFunction=&quot;ReviewerDecsiontxt&quot; ErrorMessage=&quot;Enter text for Approve this applicant to become a surveyor?&quot;
                            ForeColor=&quot;Red&quot; Text=&quot;*&quot;  ValidationGroup=&quot;req&quot;&gt;&lt;/asp:CustomValidator&gt;
                        &lt;/div&gt;
                    &lt;/td&gt;</pre>

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; }
 
<pre>
           }</pre>
Posted 5-Feb-13 1: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 490
1 Sergey Alexandrovich Kryukov 395
2 Maciej Los 285
3 ProgramFOX 265
4 CHill60 200
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 395
2 Maciej Los 285
3 ProgramFOX 265
4 CHill60 200


Advertise | Privacy | Mobile
Web03 | 2.8.150331.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2015
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