ItemCommand not firing on first click in Repeater or GridView

前端 未结 3 768
无人及你
无人及你 2021-01-22 13:37

This has been driving me crazy for 2 days now - hope someone has seen this before.

I have this issue where the first click of a control within a repeater or grid view fa

3条回答
  •  感动是毒
    2021-01-22 14:16

    I'm not sure about the rest of your code, but usually when I see a problem of "first action behaves different than subsequent actions" like this is because I placed something in the wrong side of the IsPostBack section.

    For example, I find myself binding when it's a postback, so my events don't work until the second postback, coz the first postback is when they were born, and the initial page load never did that part.

    I think you're on the right track; make sure you're binding and wiring up your events at the right moment.

提交回复
热议问题