Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
I m working asp 2.0. For Dynamically Created Textbox i worked out same the AutoCompleteExtender. So for i have been tired in repeater control.But i m unable to finished it.If u anyone have idea give ur suggeston.Below is the sample code for that i need add the AutoCompleteExtender for the TextBox "txt_username".


C#
<asp:Repeater id="repeaterentry" runat="server"  >
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Name</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox id="txt_username" runat="server" Text='<%# Eval("USER_NAME") %>'  > </asp:TextBox>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Posted

1 solution

Hi

try the following

XML
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" >
                <ItemTemplate>
                    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" >
                    </asp:GridView>
                      <asp:TextBox id="txt_username" runat="server" > </asp:TextBox>
                    <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txt_username" ServiceMethod="your method">
                    </asp:AutoCompleteExtender>
                </ItemTemplate>
                               </asp:Repeater>



Hope this helps...
 
Share this answer
 
Comments
Prince Antony G 19-Jan-12 7:24am    
could you pls explain this? why u used gridview inside the repeater
sriman.ch 20-Jan-12 2:13am    
I am just doing some example where I require gridview.
Prince Antony G 20-Jan-12 1:38am    
hey thanks for your idea.

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