asp.net - C# Repeater displaying single listing 12 times -


i have repeater i'm using display sidebar nav type system on page. loads data db display of links. should showing single listing in case, shows same listing total of 13 times.

my code:

        private void load_locations()   //loads list of locations.     {         var query = q in currentcontext.loc                     join w in currentcontext.int on q.key equals w.l_key                     select new                     {                         location = q.location                     };         rpt_locations.datasource = query;         rpt_locations.databind();     } 

^to pull data database, works use same snippet other things.

    <div class="side_menu" style="margin-left: auto; margin-right: auto; text-align: center">     <asp:repeater id="rpt_locations" runat="server" onitemcommand="rpt_locations_itemcommand">         <headertemplate>             <table>         </headertemplate>         <itemtemplate>             <tr>                 <td>                     <asp:linkbutton id="btn_location" runat="server" text='<%#eval("location") %>' font-underline="false" onclick="btn_location_click"></asp:linkbutton>                 </td>             </tr>         </itemtemplate>         <alternatingitemtemplate>             <tr>                 <td>                     <asp:linkbutton id="btn_location" runat="server" text='<%#eval("location") %>' font-underline="false" onclick="btn_location_click"></asp:linkbutton>                 </td>             </tr>         </alternatingitemtemplate>         <footertemplate>             </table>         </footertemplate>     </asp:repeater> 

^asp coding repeater.

havn't expericned issue before, pretty lost on how it's happening.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -