Repeater ItemCommand fires only after Postback

S

Sparhawk

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
Page_PreRender.
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,
Kay
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top