By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,347 Members | 2,091 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,347 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You can do this using the AddHandler keyword.
eg.
AddHandler myDropDownList.SelectedIndexChanged, AddressOf
Me.myDropDown_OnSelectedIndexChanged

--
Philip Q
Microsoft MVP [ASP.NET]

"Nirmalkumar" <Ni*********@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.