J
Jon Maz
Hi,
I have a user control which contains a DropDownList, and I want to be able
to set the OnSelectedIndexChanged method of the DDL in the User Control from
the holding aspx page.
Depending on which aspx page is holding the user control, the name of the
method to be called when this event fires is different, so I want to pass
the name of the method to the DDL via a public property of the User Control.
I'm struggling to do this; I have tried the following:
Public Property OnSelectedIndexChanged as System.EventArgs
Get
'sth here
End Get
Set
AddHandler ddlItems.SelectedIndexChanged, AddressOf value
End Set
End Property
....but this just gets the following error message:
error BC30577: 'AddressOf' operand must be the name of a method; no
parentheses are needed
Any ideas on how to get this to work?
TIA
JON
PS Posted to microsoft.public.dotnet.framework.aspnet.webcontrols two
days ago - no answers yet.
I have a user control which contains a DropDownList, and I want to be able
to set the OnSelectedIndexChanged method of the DDL in the User Control from
the holding aspx page.
Depending on which aspx page is holding the user control, the name of the
method to be called when this event fires is different, so I want to pass
the name of the method to the DDL via a public property of the User Control.
I'm struggling to do this; I have tried the following:
Public Property OnSelectedIndexChanged as System.EventArgs
Get
'sth here
End Get
Set
AddHandler ddlItems.SelectedIndexChanged, AddressOf value
End Set
End Property
....but this just gets the following error message:
error BC30577: 'AddressOf' operand must be the name of a method; no
parentheses are needed
Any ideas on how to get this to work?
TIA
JON
PS Posted to microsoft.public.dotnet.framework.aspnet.webcontrols two
days ago - no answers yet.