Assign an event to a custom control inside a Repeater control

后端 未结 3 615
野的像风
野的像风 2020-12-11 11:10

I have a Repeater control which in some of its cells contains a UserControl which contains a DropDownList. On the ItemDataBound event of the Repeater control I\'m assigning

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 11:47

    Your event is not being raised in a PostBack because your event handler has not been attached (it is only attached during the iteration of the page life-cycle when your repeater is databound).

    If you attach your event handler declaratively in the markup such as:

    
         
             
        
    
    

    Then your event handler will be called during PostBacks.

提交回复
热议问题