Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing values between user controls

0 views
Skip to first unread message

Peter K

unread,
Jan 13, 2010, 4:33:15 AM1/13/10
to
Hi

I have a page (aspx) which contains many ascx controls.

One of the ascx controls has a date-selection control, and when this is
changed some of the other ascx's have to respond by changing their display
appropriately.

What is the best way of achieving this?

Presently, in the "date selection" control, I fire an event when the date
selection changes.
The main page (aspx) subscribes to this event (from which it obtains the new
date), and then calls special public methods on the other ascx's to supply
them the date.

Is this an ok method? It means the aspx has to know all its child ascx's
which need to know the new date. Is it possible to fire another event in the
aspx, which the relevant child ascx's subscribe to?


Thanks,
Peter


Nathan Sokalski

unread,
Feb 17, 2010, 10:11:42 PM2/17/10
to
It sounds like a very efficient technique for accomplishing your goal. Have
you actually tried it yet, or are you just asking before trying to write the
code (not that either one is bad)? I am asking this because if you have
tried it and there was a problem, we may be able to help you more if you
show us the code and/or error. Good luck!
--
Nathan Sokalski
njsok...@hotmail.com
http://www.nathansokalski.com/

"Peter K" <p...@alpha-solutions.dk> wrote in message
news:#r1MwNDl...@TK2MSFTNGP06.phx.gbl...

0 new messages