Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to attach an event to dynamically created control in VB.NET

Reply
Thread Tools

How to attach an event to dynamically created control in VB.NET

 
 
=?Utf-8?B?TmlybWFsa3VtYXI=?=
Guest
Posts: n/a
 
      01-12-2005
How to attach an event to dynamically created control in VB.NET

I have dynamically created dropdown list in code behind (VB.NET). For this
control I want to attach an event for action ‘OnSelectedIndexChanged’.

What is the property to assigne an event to a dynamically created dropdownlist

 
Reply With Quote
 
 
 
 
Philip Q [MVP]
Guest
Posts: n/a
 
      01-12-2005
You can do this using the AddHandler keyword.
eg.
AddHandler myDropDownList.SelectedIndexChanged, AddressOf
Me.myDropDown_OnSelectedIndexChanged

--
Philip Q
Microsoft MVP [ASP.NET]

"Nirmalkumar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How to attach an event to dynamically created control in VB.NET
>
> I have dynamically created dropdown list in code behind (VB.NET). For this
> control I want to attach an event for action 'OnSelectedIndexChanged'.
>
> What is the property to assigne an event to a dynamically created
> dropdownlist
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
Is there any shortcut for "Debug > Attach > Attach to aspnet_wp.exe"? Warren Tang ASP .Net 1 09-17-2008 03:46 PM
attach agent to applet running in firefox (attach api) craiget@gmail.com Java 0 06-14-2007 12:28 AM
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created) dickster ASP .Net Building Controls 0 12-08-2005 09:32 AM
dynamically generate script block and attach to event Nikhil Patel ASP .Net 3 10-07-2004 09:41 PM



Advertisments