Click here to Skip to main content
14,925,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to change or visible/unvisible controls under repeater control. I want to do in DropDownList Change.
Mahesh Bailwal 19-Aug-13 7:59am
Please provide more information.
Abhilask kumar 19-Aug-13 8:40am
I have create two control inside repeater control one is dropdownlist second is textbox. and text box visible is false . i want on change of dropdownlist textbox is visible true.
CodeBlack 19-Aug-13 8:05am
where is dropdown ? inside repeater or outside repeater ?
Abhilask kumar 19-Aug-13 8:32am
inside repeater control and changeable textbox is also inside.

1 solution

I have created one sample which contains one Repeater and One JavaScript method as shown below :

Repeater :
           <asp:repeater runat="server" id="repeaterTest" >
                           <asp:dropdownlist runat="server" id="ddlTest" onchange="ManageControl( , this.value)">
                                   <asp:listitem text="Show" value="1"></asp:listitem>
                                   <asp:listitem text="Hide" value="0"></asp:listitem>
                           <asp:textbox runat="server" id="textTest"></asp:textbox>


<script type="text/javascript">
        function ManageControl(id, selectedValue) {
            var text = document.getElementById(id.replace("ddlTest", "textTest"));
            if (selectedValue == "1") {
       = "";
            } else {
       = "none";

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900