Hi,
an important thing in all this is that you recreate the control before the
viewstate is restored, for info when everything happens see this link:
http://msdn.microsoft.com/library/de...nLifecycle.asp .
If the same control structure doesn't exists when the viewstate is restored
it will not be able to "discover" the events. As Marintov wrote you have
also to define where this event is going to be handled in the "tag" of the
checkbox list.
So what does all this mean, basically this (only pseudo code for how the
behind code could be structured.):
Sub Page_Init()
// code to bind your repeater
// after the page init the viewstate will be restored.
End Sub
Sub ChkBoxlist_Inde xChange()
// here is your event!
// if you want to access some other control that is within the same
repeater element use the parent property of the reperater.
End Sub
I hope this clears things up
Cheers
Cristian
"marinov" <tr*@me.com> wrote in message
news:Op******** *****@TK2MSFTNG P10.phx.gbl...
have you tried to create the event of the checkboxlist like
<asp:CheckBoxLi st id=.... OnSelectedIndex Changed="YourEv entName"
AutoPostBack=Tr ue>
....
this will tell to the asp.net that when a checkbox is clicked the
YourEventName event will fired, BUT you have to declare your event as
Public other wise asp.net won't find it :(
Hope This Helps
Regards
Martin Marinov
"JD" <sk*****@hotmai l.com> wrote in message
news:uy******** *****@TK2MSFTNG P09.phx.gbl... Hello,
I have a problem with checkboxlist inside Repeater (in ASP.NET page).
I am able to create Checkboxlist and bind it (inside
Repeater_ItemBo und - including setting checked/unchecked). Checkboxlist has Autopostback=tr ue
so whenever I click on checkbox, the page is submitted to the server.
Here starts my problem:
I am not able to capture the click event of checkbox list to find out
which checkbox was clicked (which generated click event) and retrieve the
value associated with it (for further processing).
I have List_SelectedIn dexChanged function but it never fires. I am
obviously missing something, I don't undestand event bubling enough.
Any idea? Any help?
Thanks
JD