How exactly can I get my main page to know that an event was raised on a user control?

G

Gummy

Hello,

I have a user control that has radio buttons and a listbox. This user
control is repeated several time on my webpage.

What I want to do is alert the main page that the radio buttons were clicked
(changed). I know this has to do with Events and I can see the changed event
and work with it within the user control. I just don't know how to have that
Event sent (or raised) to the page holding all the user controls.
Specifically, I want to listbox to fill with different data based on which
radio button was clicked, and access to the data is held outside the user
control.

I have seen that this has to do with delegates and consuming events, but I
am specifically looking for the actual code (C#) that makes the main page
react (consume?) when the radio button is clicked on the user control.

I hope that is clear. Because I am having a hard time getting my head around
Events and Delegates.

Thank you for the help.

-Rob
 
G

Gummy

Thank you for the information. I will take a look at this. It certainly
appears to be what I need.

I've seen in VB.NET (for ASP) you can add the event with the Handles
keyword. I am trying to figure this out for C#.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top