Click here to Skip to main content
15,843,144 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionError message: The operation cannot be completed because the DbContext has been disposed Pin
indian14327-Jul-17 12:39
indian14327-Jul-17 12:39 
AnswerRe: Error message: The operation cannot be completed because the DbContext has been disposed Pin
Richard Deeming28-Jul-17 2:31
mveRichard Deeming28-Jul-17 2:31 
AnswerRe: Error message: The operation cannot be completed because the DbContext has been disposed Pin
Nathan Minier28-Jul-17 2:36
professionalNathan Minier28-Jul-17 2:36 
QuestionUnable to use RequiredValidator control to validate RadioButtonList in Repeater? Pin
samflex26-Jul-17 15:25
samflex26-Jul-17 15:25 
AnswerRe: Unable to use RequiredValidator control to validate RadioButtonList in Repeater? Pin
F-ES Sitecore26-Jul-17 23:45
professionalF-ES Sitecore26-Jul-17 23:45 
GeneralRe: Unable to use RequiredValidator control to validate RadioButtonList in Repeater? (SOLVE) Pin
samflex27-Jul-17 4:05
samflex27-Jul-17 4:05 
QuestionFew questions about web api versioning in core Pin
Mou_kol26-Jul-17 2:38
Mou_kol26-Jul-17 2:38 
QuestionEnable/Disable div based on RadiobuttonList Pin
samflex25-Jul-17 6:41
samflex25-Jul-17 6:41 
Greetings experts,

I have a Repeater control with radiobuttonlist:

<asp:Repeater ID="repeaterItems" runat="server"
             Purchased:<asp:radiobuttonlist ID="rblPurchaseType" runat="server" RepeatDirection="Horizontal" TextAlign="Right" style="display:inline;">
                 <asp:ListItem Text="New" />
                 <asp:ListItem Text="Used" />
                </asp:RadioButtonList>
</asp:Repeater>


Then I have some textbox controls inside a div. This div is outside the Repeater control:

   <div id="purchaseNewUsed" runat="server">
   <table border="0" width="100%">
   <tr>
    <td>
  <tr>
    <td>NAME:</td><td><div class="input text"> <asp:TextBox ID="txtPrevOnwerName" style="width:450px;" runat="server"></asp:TextBox></div></td>
  </tr>
  <tr>
    <td>ADDRESS:</td><td><div class="input text"> <asp:TextBox ID="TextBox6" style="width:450px;" runat="server"></asp:TextBox></div></td>
  </tr>
    <tr>
   <td>         CITY:</td><td><div class="input text"> <asp:TextBox ID="TextBox7" style="width:150px;" runat="server"></asp:TextBox></div></td><td>  STATE:</td><td><div class="input select">
     <asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True">
     <asp:ListItem Value="" Selected="False"></asp:ListItem>
   </asp:DropDownList>
   </div></td><td>  ZIP:</td><td><div class="input text"> <asp:TextBox ID="TextBox9" style="width:50px;" runat="server"></asp:TextBox></div></td>
  </tr>
</table></div>


I understand about using wildcards when dealing with controls inside a Repeater.

My issue is the DIV is outside the Repeater control while the RadioButtonList is inside the Repeater control.

The following script is not enabling or disabling the DIV when Used option is selected.

Any ideas how to get this to work?

script type="text/javascript">
        $(document).ready(function() {
            $('#rblPurchaseType input').change(function () {
                if ($(this).val() == "New") {
                    $("#purchaseNewUsed").prop("disabled", true);
                }
                else {
                    $("#purchaseNewUsed").prop("disabled", false);
                }
            });
        });
    </script>


Thanks in advance
AnswerRe: Enable/Disable div based on RadiobuttonList Pin
F-ES Sitecore25-Jul-17 7:30
professionalF-ES Sitecore25-Jul-17 7:30 
AnswerRe: Enable/Disable div based on RadiobuttonList Pin
Richard Deeming25-Jul-17 7:50
mveRichard Deeming25-Jul-17 7:50 
GeneralRe: Enable/Disable div based on RadiobuttonList (SOLVED) Pin
samflex25-Jul-17 10:32
samflex25-Jul-17 10:32 
QuestionVisual Studio & Asp.Net in Web Forms Bad Design view Pin
zequion23-Jul-17 3:23
professionalzequion23-Jul-17 3:23 
QuestionTable resizing in MVC bootstrap Pin
Member 1075459521-Jul-17 8:31
Member 1075459521-Jul-17 8:31 
AnswerRe: Table resizing in MVC Pin
Member 1075459527-Jul-17 11:44
Member 1075459527-Jul-17 11:44 
QuestionResponse.Cache, Code Location Pin
jkirkerx17-Jul-17 10:24
professionaljkirkerx17-Jul-17 10:24 
AnswerRe: Response.Cache, Code Location Pin
Richard Deeming17-Jul-17 11:09
mveRichard Deeming17-Jul-17 11:09 
GeneralRe: Response.Cache, Code Location Pin
jkirkerx18-Jul-17 8:38
professionaljkirkerx18-Jul-17 8:38 
QuestionUsing Visual Studio to debug iHTTPHandler routines Pin
Member 839420716-Jul-17 22:26
Member 839420716-Jul-17 22:26 
Questionwhat is default concurrent requests settings in IIS 8.5 Pin
bhavin chheda16-Jul-17 3:02
bhavin chheda16-Jul-17 3:02 
AnswerRe: what is default concurrent requests settings in IIS 8.5 Pin
Richard MacCutchan16-Jul-17 3:42
mveRichard MacCutchan16-Jul-17 3:42 
QuestionPassword Field Padding with Question Marks (?s) Pin
ftbadolato7615-Jul-17 16:05
ftbadolato7615-Jul-17 16:05 
AnswerRe: Password Field Padding with Question Marks (?s) Pin
Richard MacCutchan15-Jul-17 21:52
mveRichard MacCutchan15-Jul-17 21:52 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
ftbadolato7616-Jul-17 4:36
ftbadolato7616-Jul-17 4:36 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
Richard MacCutchan16-Jul-17 6:43
mveRichard MacCutchan16-Jul-17 6:43 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
Nathan Minier17-Jul-17 2:15
professionalNathan Minier17-Jul-17 2:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.