473,320 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Event Handler!

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

Nov 19 '05 #1
2 1006
See:

http://msdn.microsoft.com/library/de...serespeven.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.

"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:eW**************@TK2MSFTNGP11.phx.gbl...
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

Nov 19 '05 #2
On Mon, 03 Oct 2005 08:36:13 +1000, Adam Knight wrote:
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).
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
6
by: vbMark | last post by:
If I have a control, for example a CheckedListBox, how do I add and event to code, for example that a box has been checked by the user? Thanks
13
by: Charles Law | last post by:
Mr "yEaH rIgHt" posted the following link about a week ago in answer to my question about removing event handlers. > http://www.vbinfozine.com/t_bindevt.shtml Following on from that post, the...
3
by: Beth | last post by:
in the following: this.ExitButton.Click += new System.EventHandler(this.ExitButton_Click); if I saw an equation, such as y +=x; then y = y+x. But what is the meaning in the event handler. I...
5
by: Richard Grant | last post by:
Hi, I need to "save" in a variable the event handler sub of a control's event, then perform some process, and finally "restore" the originally saved event handler. Example in pseudo-code: 1)...
1
by: tdan | last post by:
I do not know how to get Event.stopObserving() to work in the context I am using it. I am displaying a Color Selection Table and attaching 2 events: 1. onmouseover to display the color to the user...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
2
by: =?Utf-8?B?UlJK?= | last post by:
Hello, I would like to add the Paint handler to the form. How to do it? Thanks in advance.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.