Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2004, 01:48 AM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to deepak_8282
Default handling event for a dynamic object

hi,
    i m using asp.net to develop a web application.

    i have a webform in which i should dynamically create
    controls like table,button,dropdownlist etc.

    suppose i create an object of type "button" by :
    dim bt as new button.

    now what i'll do is that i will add the new button
    object bt to my webform. but the problem i m facing is
    that i dont know how to handle events (like onclick)
    for this newly created object bt.

   plz help friend.

 
Old October 25th, 2004, 11:32 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Add event to that button class using AddHandler method
ex. AddHandler bt.Click,AddressOf OnClickHandler
Public Sub OnClickHandler(ByVal EventNumber As Integer)
   MessageBox.Show("Received event number " & CStr(EventNumber))
End Sub


 
Old May 14th, 2007, 12:42 PM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to andrebrazil Send a message via MSN to andrebrazil
Default

Wow!!! That´s fantastic!!! Thanks a lot, friend :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Handling C# 2.0 [email protected] C# 2005 2 January 25th, 2008 11:37 AM
Event handling in c# bhavna VS.NET 2002/2003 1 March 7th, 2007 12:19 PM
Event handling in c# bhavna General .NET 1 March 7th, 2007 05:32 AM
Event Handling Bill Crawley ASP.NET 2.0 Basics 0 February 28th, 2007 07:32 AM
Help with Event handling nulogix Java GUI 1 October 11th, 2004 03:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.