Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4334082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:28:48+00:00 2026-05-21T10:28:48+00:00

I have a custom search control on my page (asp.net) which contains a textbox

  • 0

I have a custom search control on my page (asp.net) which contains a textbox and a repeater for displaying results.

The repeater is populated with a callback as the user types … nice and simple callback.

…

When a search result is selected the repeater fires off a postback and the itemcommand event is raised (as expected) … and this event adds a child repeater to itself and binds a child list to the current item.

My problem is that I don’t want my parent repeater to fire off a full postback because the page is quite time consuming to render.
I tried putting the control / just the outer repeater in to an ajax update panel control but it appears to still fire a ful postback.

Can anyone shed any light on how I might tell a repeater to fire its item command event in a callback instead of a postback?

I’m guessing this involves a load of manual wiring for my repeater item controls but i’m hoping theres a control somewhere that handles all that for me 🙂

EDIT : Sample of my situation ….

<asp:UpdatePanel ... >
  <asp:Repeater ...>
    <itemTemplate> <asp:LinkButton ... CommandArg='<%= Eval("ID") %>' CommandName="select" /> </itemTemplate>
  </asp:Repeater>
</asp:UpdatePanel>

So my question is …

How do i tell the repeater “fire this link buttons onclick as a callback instead of a postback”

the process of wrapping up the repeater in an update panel doesn’t help because the ID of the link button is dynamic and therefore I cannot (not inline anyway) add a trigger for the link button.

If i manually add a trigger to the panel in the repeaters onitembound event i get an exception from .Net sayingt he callback reference is invalid … i guess this is because im trying to attach a callback trigger to a control that is already handling a postback event or something setup by the repeater …

EDIT 2 : Sample of the scenario faced here

essentially because this control X number of times on the page virtually everything has to be dynamic.
The control implements ICallbackHandler and the search bx code (not included below) fires off an ajax call onkeyup when the user types in company names (so it works a bit like google).

I was hoping that when a user clicked on a company name from the list it would ajax call back / partial postback to recover the sub list of branches thus preventing the full page flicker you get with a full postback.

Then a user would select a branch and it would do a full postback which would result in several server actions taking place.

This works fine as is … its just not the cleanest user experience.

<div id='<%= this.UniqueID + "Results" %>' class="results">
    <asp:Repeater ID="ui_lstCompanies" runat="server" onitemcommand="ui_lstCompanies_ItemCommand">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>
        <ItemTemplate>
            <asp:Panel ID="item" runat="server">
            <li>
                <asp:LinkButton ID="ui_btnSelectCompany" runat="server" CommandName="Select" Text='<%# Eval("Name") %>' />
            </li>
            </asp:Panel>
            <asp:Panel ID="selectedItem" runat="server" Visible="false">
            <li>
                <hr /><h4><%# Eval("Name") %></h4> 
                <asp:Repeater ID="ui_lstBranches" runat="server" onitemcommand="ui_lstBranches_ItemCommand" >
                    <HeaderTemplate>
                        <table style="border-collapse:collapse;">
                            <tr><th>&nbsp;</th><th>Branch Name</th><th>Branch Address</th><th>Tel</th><th>Fax</th><th>Email</th></tr>
                    </HeaderTemplate>
                    <ItemTemplate>   
                            <tr>
                                <td>&nbsp;&nbsp;&nbsp;</td>
                                <td><asp:LinkButton ID="ui_btnSelectBranch1" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Select" Text='<%# Eval("Name") %>' /></td>
                                <td><asp:LinkButton ID="ui_btnSelectBranch2" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Select" Text='<%# Eval("Address") %>' /></td></td>
                                <td><asp:LinkButton ID="ui_btnSelectBranch3" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Select" Text='<%# Eval("Telephone1") %>' /></td></td>
                                <td><asp:LinkButton ID="ui_btnSelectBranch4" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Select" Text='<%# Eval("Fax") %>' /></td></td>
                                <td><asp:LinkButton ID="ui_btnSelectBranch5" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Select" Text='<%# Eval("Email") %>' /></td></td>
                             </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <hr />
            </li>
            </asp:Panel>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:28:49+00:00Added an answer on May 21, 2026 at 10:28 am
     <asp:Repeater runat="server" ID="rpt1">
        </asp:Repeater>
    
    
    <asp:UpdatePanel runat="server" ID="up1">
    <Triggers>
    <asp:AsyncPostBackTrigger  ControlID="rpt1"/>
    </Triggers>
    <ContentTemplate>
         <asp:Repeater runat="server" ID="rpt2">
        </asp:Repeater>
    </ContentTemplate>
    </asp:UpdatePanel>
    

    This should then perform an async call to all commands from rpt1.
    Just Replace these repeater control’s with yours

    EDIT:

    I’ve basically created a mockup of your code with different fields etc. I assume the code below is what you tried and it was not working? If so then I’ve got no idea why it’s not working on your side as it is on myne, there must be some slight difference somewhere that we’re not picking up.

    <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
        <ContentTemplate>
            <div id='<%= this.UniqueID + "Results" %>' class="results">
                <asp:Repeater ID="ui_lstCompanies" runat="server" OnItemCommand="ui_lstCompanies_ItemCommand">
                    <HeaderTemplate>
                        <ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Panel ID="item" runat="server">
                            <li>
                                <asp:LinkButton ID="ui_btnSelectCompany" runat="server" CommandName="Select" Text='<%# Eval("Name") %>' />
                            </li>
                        </asp:Panel>
                        <asp:Panel ID="selectedItem" runat="server" Visible="false">
                            <li>
                                <hr />
                                <h4>
                                    <%# Eval("Name") %></h4>
                                <asp:Repeater ID="ui_lstBranches" runat="server" OnItemCommand="ui_lstBranches_ItemCommand">
                                    <HeaderTemplate>
                                        <table style="border-collapse: collapse;">
                                            <tr>
                                                <th>
                                                    &nbsp;
                                                </th>
                                                <th>
                                                    Branch Name
                                                </th>
                                                <th>
                                                    Branch Address
                                                </th>
                                                <th>
                                                    Tel
                                                </th>
                                                <th>
                                                    Fax
                                                </th>
                                                <th>
                                                    Email
                                                </th>
                                            </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                &nbsp;&nbsp;&nbsp;
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="ui_btnSelectBranch1" runat="server" CommandArgument='<%# Eval("ID") %>'
                                                    CommandName="Select" Text='<%# Eval("Name") %>' />
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="ui_btnSelectBranch2" runat="server" CommandArgument='<%# Eval("ID") %>'
                                                    CommandName="Select" Text='<%# Eval("Address") %>' />
                                            </td>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="ui_btnSelectBranch3" runat="server" CommandArgument='<%# Eval("ID") %>'
                                                    CommandName="Select" Text='<%# Eval("Telephone1") %>' />
                                            </td>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="ui_btnSelectBranch4" runat="server" CommandArgument='<%# Eval("ID") %>'
                                                    CommandName="Select" Text='<%# Eval("Fax") %>' />
                                            </td>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="ui_btnSelectBranch5" runat="server" CommandArgument='<%# Eval("ID") %>'
                                                    CommandName="Select" Text='<%# Eval("Email") %>' />
                                            </td>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                                <hr />
                            </li>
                        </asp:Panel>
                    </ItemTemplate>
                    <FooterTemplate>
                        </ul>
                    </FooterTemplate>
                </asp:Repeater>
            </div>
    </ContentTemplate>
    </asp:UpdatePanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom control in winform, which is a search textbox. It has
I have a custom control which is a combination of textbox and button (a
I have an ASP.net page. That has an Ajax Toolkit Tab Control. That has
I have made one custom user control (search text box), which basically consists of
I have a custom search engine on a non-wordpress page. This search engine searches
I have created a custom control using VB.NET in Visual Studio 2008 that gives
I have a simple user control that contains some buttons that fire events which
I came across an interesting problem recently. In an ASP.NET Master Page, I have
I have a custom control: it's managed code, which subclasses System.Windows.Forms.Control. I want to
I am developing a custom list-search tool. I have multiple custom properties to retain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.