I have written a custom control to render a check box list to the page. The default .NET one didn't render to my page correctly because I needed to Enable / Disable the checkboxes depending on user permissions.
What I now need to do is add an OnItemDataBound event to the repeater inside the control by assigning it a sub from my page.
Basically I want to be able to have in my page:-
I'm not entirely sure what I should have in my custom control to expose this method, allow me to apply my own subroutine to it and then execute this OnItemDataBound event when my control loads.Code:myCustomControl.OnItemDataBound = ASubRoutineInMyPage . . protected void ASubRoutineInMyPage(object s, RepeaterItemEventArgs e) { . . . }
Any ideas or examples I could try?
I want to reuse the control in a number of pages and so need to be able to call a different routine depending on the page, or no event at all.



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks