Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > dynamic events on dynamic controls

Reply
Thread Tools

dynamic events on dynamic controls

 
 
dje
Guest
Posts: n/a
 
      06-25-2004
I'm creating my first custom control; it has a table with a variable
number of cells (user defined at design time). Each cell has a button.
Is it possible to attach events to these buttons? If so, how?
 
Reply With Quote
 
 
 
 
ashelley@inlandkwpp.com
Guest
Posts: n/a
 
      06-25-2004
On 25 Jun 2004 09:55:47 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (dje) wrote:

>I'm creating my first custom control; it has a table with a variable
>number of cells (user defined at design time). Each cell has a button.
>Is it possible to attach events to these buttons? If so, how?


You will have to probably recreate the whole table with all the cells
/ buttons / event handlers each time the page comes back. this is not
a definate answer tho.

-Adam
 
Reply With Quote
 
 
 
 
Robert Koritnik
Guest
Posts: n/a
 
      06-28-2004
Yes. You have to recreate the whole control again. You probably do that n
CreateChildControls overridden method. You have to do this in some way:
- recreate all controls
- restore from some persisting storage (Cache, Session etc). Somewhere where
you can store whole objects

When you recreate those you always have to connect to event handlers the
normal way.

Would you like to have a default event handler or would you like to define
the handler on the page, that uses this control. You'd have to do some more
coding if the second one is the case.

--
RobertK
{ Clever? No just smart. }

"dje" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I'm creating my first custom control; it has a table with a variable
> number of cells (user defined at design time). Each cell has a button.
> Is it possible to attach events to these buttons? If so, how?



 
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
dynamically adding controls with events (but events are not firing) SevDer ASP .Net 2 11-13-2007 06:33 AM
runtime events that generate other controls and events newbye ASP .Net 0 07-06-2006 06:27 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
order of events - dynamic checkbox events =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?= ASP .Net 0 08-17-2005 10:36 PM
Dynamic Events from Dynamic Controls on a User Control - Guess What? Broken! mytestemailaccount@gmail.com ASP .Net 5 03-23-2005 05:06 PM



Advertisments