Event Handler!

  • Thread starter Thread starter Adam Knight
  • Start date Start date
A

Adam Knight

Hi all,

This is a bit of a rephrased version of a post i made a few days ago.

What i am wanting to do is add the OnSelectedIndexChanged (DropDownList -
Event) event handler to a drop down list at run time.

I have tried a couple of ways of acheiving this. My most recent attempt is:

'specify OnSelectedIndexChanged method Sub
ddlAssessmentAreas.SelectedIndexChanged = New
System.EventHandler("LoadQuestions")

This is a server side event i am trying to use, not client side.

I am in a bit of a bind, and need to get past this asap.

Can anyone help?

Adam
 
Hi all,

This is a bit of a rephrased version of a post i made a few days ago.

What i am wanting to do is add the OnSelectedIndexChanged (DropDownList -
Event) event handler to a drop down list at run time.

I have tried a couple of ways of acheiving this. My most recent attempt is:

'specify OnSelectedIndexChanged method Sub
ddlAssessmentAreas.SelectedIndexChanged = New
System.EventHandler("LoadQuestions")

This is a server side event i am trying to use, not client side.

I am in a bit of a bind, and need to get past this asap.

Can anyone help?

Adam
Normally you would specify the handler in the server control on your aspx
file OnSelectedIndexChanged attribute(<asp:DropDownList. But I see that
you are using VB.Net; in this case Visual Studio will handle the wiring
when your Sub declaration contains the Handles keyword (note that the
event is raised by an object with the WithEvents keyword).
 
Back
Top