Event Handler!

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
 
I

intrader

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top