I have a Sharepoint WebPart that loads a user control. The user control contains a repeater, which in turn contains several LinkButtons buttons.
In a call to RenderContent in Webpart, I have code to add event handlers:
ArrayList nextPages = new ArrayList(); //populate nextPages .... AfterPageRepeater.DataSource = nextPages; AfterPageRepeater.DataBind(); foreach (Control oRepeaterControl in AfterPageRepeater.Controls) { if (oRepeaterControl is RepeaterItem) { if (oRepeaterControl.HasControls()) { foreach (Control oControl in oRepeaterControl.Controls) { if (oControl is LinkButton) { ((LinkButton)oControl).Click += new EventHandler(PageNavigateButton_Click); } } } } }
The PageNavigateButton_Click function is never called. I see that it is being added as an event handler in the debugger.
Any ideas? I'm at a dead end on how to do this.
source share