Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends

I am having problem in getting dropdownlist Id which is in Repeater Control in Javascript..

i have tried it but it is not working

XML
<script type="text/javascript">

      function ShowDDl() {

         var id = document.getElementById("<%= ChangeQuantityDDL.ClientID %>")

      }

  </script>


it gives me an Error that ChangeQuantityDDL do not exist in current context

XML
<asp:Repeater ID="ItemListDL" runat="server"    >
<ItemTemplate>
                   <tr>
                       <td>
   <asp:Label ID="Label2" runat="server" Text='<%#Eval("Quantity")%>'></asp:Label><a href="#"  önclick="javascript:ShowDDl();"> Change</a><asp:DropDownList ID="ChangeQuantityDDL" runat="server" Visible="false">
                                <asp:ListItem>1</asp:ListItem>
                          <asp:ListItem>2</asp:ListItem>
                          <asp:ListItem>3</asp:ListItem>
                          <asp:ListItem>4</asp:ListItem>
                          <asp:ListItem>5</asp:ListItem>
                          <asp:ListItem>6</asp:ListItem>
                          <asp:ListItem>7</asp:ListItem>
                          <asp:ListItem>8</asp:ListItem>
                          <asp:ListItem>9</asp:ListItem>
                          <asp:ListItem>10</asp:ListItem>
                          <asp:ListItem>11</asp:ListItem>
                          <asp:ListItem>12</asp:ListItem>
                          <asp:ListItem>13</asp:ListItem>
                          <asp:ListItem>14</asp:ListItem>
                          <asp:ListItem>15</asp:ListItem>
                                                                                                                                  </asp:DropDownList></td>
                        <td>




please give me soluton for this as soon as possible..

Thanks in Advance..
Posted

1 solution

Refer to this link. It is somewhat relevant to what you are aimed at.

get ClientID for a specific user control bounded in a repeater[^]

Regards..:)
 
Share this answer
 

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