OnItemDataBound is a delegate, you can not change its signature
(parameter list). if you want it different you need to define a new
delegate. you would do this by creating a new repeater (inherit from
repeater), and create a new delegate.
also as OnItemDataBound is a delegate, it wants a delegate (routine
name), not a method with parameters.
-- bruce (sqlwork.com)
mj.redfox.mj@gmail.com wrote:
Quote:
Hi,
>
Pretty basic question, apologies but being a bit of a newbie I still
don't know the answer to this kind of thing!
>
>
I have a repeater which, upon databind calls a subroutine, as below:
>
ASPX PAGE
-------------------
<asp:Repeater ID="repAssigneeGroups" runat="server" DataSource='<
%#Container.DataItem.Row.GetChildRows("relAssignee Groups")%>'
OnItemDataBound="Test_Sub">
>
And the subroutine is as below:
>
VB PAGE
---------------
Public Sub Test_Sub(ByVal Sender As Object, ByVal e As
RepeaterItemEventArgs)
>
>
Now this all works fine, as Sender and e are passed automatically.
However, in addition to these, I also need to pass a couple of my own
variables. The problem is that as soon as I start passing anything in,
it expects me to MANUALLY pass Sender and the event args as well, and
I'm afraid I have no idea how to do this. So basically all I'm asking
is how do I generate and pass the repeater 'sender' and 'eventargs'
information manually. Can anyone help at all?
>
Just to summarise, this is what I need to do (asterisks for the parts
I'm missing):
>
ASPX PAGE
-------------------
<asp:Repeater ID="repAssigneeGroups" runat="server" DataSource='<
%#Container.DataItem.Row.GetChildRows("relAssignee Groups")%>'
OnItemDataBound="Test_Sub(****, ****, myval1, myval2)">
>
VB PAGE
---------------
Public Sub Test_Sub(ByVal Sender As Object, ByVal e As
RepeaterItemEventArgs, ByVal myval1 as integer, ByVal myval2 as
integer)
>