Repeater ItemCommand fires only after Postback

Discussion in 'ASP .Net' started by Sparhawk, Jul 21, 2004.

  1. Sparhawk

    Sparhawk Guest

    I got a weird problem with a repeater.

    The Repeater has an ImageButton in its ItemTemplate.
    The Repeater has an ItemCommand defined.

    If the user clicks one of the buttons, nothing happens.
    If he clicks again, after postback, the ItemCommand is raised like it
    is supposed to do.
    This behavior is reproducible.

    I am binding the Repeater to a DataSet.
    My Page_Load is empty, instead I am doing the DataBinding in
    Since the ItemCommand is changing the underlying data, I would have to
    DataBind twice, if I did it in Page_Load.
    By the way, I tried DataBinding in Page_Load (and in ItemCommand), but
    the problem remains the same. Only after the first postback the
    buttons work.

    Any ideas how this comes to pass?

    Thanks in advance,
    Sparhawk, Jul 21, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.