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 6148379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:16:14+00:00 2026-05-23T19:16:14+00:00

Here’s the scenario: I have a repeater inside an UpdatePanel called updPanel. Inside this

  • 0

Here’s the scenario:

I have a repeater inside an UpdatePanel called updPanel.

Inside this repeater I have two Buttons, which fire an ItemCommand.

In the page load I have this method:

if (!IsPostBack)
{               
    Bind();
}

Then, on Bind():

public void Bind()
{
    rptList.DataSource = Model.GetData(Version);
    rptList.DataBind();
}

Then, on ItemCommand event:

public void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
{
    //Some code to get info about the DataItems
    if (e.CommandName.Equals("MyCommandName1"))
    {
        //Do Stuff
    }
    else if (e.CommandName.Equals("MyCommandName2"))
    {
        //Do Other Stuff
    }
    Bind();
}

I have a button (inside the same update panel, but outside the repeater) which does nothing but Bind().

When I click an ItemCommand, the command executes, but the screen is not updated (One of the item buttons should change its icon after clicking). If I refresh the page, or click the “Bind” button, the repeater shows the data as expected.

Why isn’t it binding after ItemCommand?

Thanks in advance!

EDIT: My Repeater:

<asp:Repeater ID="rptList" runat="server">
    <HeaderTemplate>
        <h3>
            <b class="rollback">Rollback</b> | <b class="emteste">Em Teste</b> | <b class="aindanaoincluido">
                            Ainda não Incluído</b> | <b class="parcialmenteok">Atividade Parcialmente OK</b>
                        | <b class="todosok">Atividade OK em Todas as Lojas</b> | <b class="publicado">Atividade
                            Publicada</b>
        </h3>
    </HeaderTemplate>
    <ItemTemplate>
        <div class="item" style="display: inline-block">
            <p style="font-size: 12px">
                <asp:ImageButton ToolTip="Marcar como Rollback" ImageUrl="/_layouts/Extensions/Versioning/img/rollback.png"
                                CommandName="MarkAsRollback" ID="btnItemRollback" CssClass="itembutton" runat="server" />
                <asp:ImageButton ToolTip="Esta atividade possui código. Clique para sinalizar como apenas procedure/config"
                                ImageUrl="/_layouts/Extensions/Versioning/img/code.png" CommandName="MarkAsProc"
                                ID="btnItemProc" CssClass="itembutton" runat="server" />
                 <asp:Image ToolTip="Esta atividade não possui scripts de banco/zips." ImageUrl="/_layouts/Extensions/Versioning/img/noscript.png"
                                runat="server" CssClass="itembutton" ID="btnItemScript" />
                 <asp:Label ID="labelWI" Text="" runat="server"></asp:Label>
                 <span style="color: #4A82CB">
                                <%# DataBinder.Eval(Container.DataItem, "SystemAssignedTo") %>
                                - </span><span style="color: Navy">
                                    <%# DataBinder.Eval(Container.DataItem, "SystemTitle") %>
                                </span>
                 <asp:HiddenField ID="workItemID" runat="server" />
              </p>
         </div>
         <hr class="item" noshade style="color: #4CBDCB; height: 2px; background-color: #4CBDCB" />
     </ItemTemplate>
</asp:Repeater>

EDIT: To simplify, this is the behavior i’m getting:

Clicking on a button outside the repeater: Icon changes. DB Updates.

Clicking on a button inside an item in the repeater: Icon doesn’t change. DB Updates.

Clicking again on a button inside an item in the repeater: Icon changes. DB Updates. But now the corresponding item is wrong because I already changed the flag again

It seems to have to do with the order in which things happen.

EDIT: I forgot to mention, I tested with a full postback and everything works ok.

  • 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-23T19:16:15+00:00Added an answer on May 23, 2026 at 7:16 pm

    When are you loading myDataSource?

    If you’re loading data into it in Page_Load, which is executed before rptList_ItemCommand, then bind() would be binding an old set of data to the repeater. This would explain your third summary point:

    Clicking again on a button inside an item in the repeater: Icon changes. DB Updates. But now the corresponding item is wrong because I already changed the flag again

    Can you give us more details about your datasource and the event handler for the button outside the repeater?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.