2 User Controls on a page need to talk.

U

UJ

I have two user controls on a page. When a user selects something from one,
the other one has to react. How do I go about this?

TIA.

Jeffrey.
 
V

vMike

UJ said:
I have two user controls on a page. When a user selects something from one,
the other one has to react. How do I go about this?

TIA.

Jeffrey.
Here is how I would handle it. There may be other ways.
Page1 has controlA and ControlB. In Page1 declare the controls "withevents".
In ControlA you need an event which can be raised, say ControlA_Click. In
ControlB you need a property which can be set. In Page1 you need a process
to handle the ControlA_Click event. In that process you set the property of
controlB. If you need to pass a value then you can pass it in an event
argument.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top