Sunday, March 11, 2012

My repeater control itemcommand event not firing when hosting a user control in itemtemp

Do you have a Button or something also in the Template to cause a postback? E,g ItemCommand event is raised if control raises its Command event which is bubbled up to the Repeater. Examples of controls raising Command event and causing ItemCommand to be raised are: Button, ImageButton and LinkButton.

If you just type text into textBox and then press Enter to submit, that won't raise ItemCommand event. So can you describe a bit more what you have so far and how do you expect the event to be raised?


i have only textboxes in my itemtemplate, no button or imagebutton
Try this

<asp:Repeater id="rep runat="server"onItemDataBound="rep_ItemDataBound">

I think we need to include a handler in itemcomand not databound since I want to fire the event only if the textboxes change but not whenever the itemtemplates re bound.

Thanks


You're right. I should have read the question carefully.

No comments:

Post a Comment