event inheritance between user control and parent

B

balint kardos

hi,

i've a web application with the following:

- a user class, this communicating with a webservice, and has a event
User_UserChanged() (user.cs)
- a user control (login.ascx)
- a shopbasket control (basket.ascx)
- a webpage, which hosts the user controls (default.aspx)

if one logs in at login.ascx, I call User.Login(), and User.Login() will
rise the User_UserChanged() event, but it will be raised be locally, in the
user control, not in the parent default.aspx.cs!
if I don't have the event handler (user.UserChanged += new
System.EventHandler(this.User_UserChanged);) in login.ascx, it will throw a
null exception.
Now I have it in both login.ascx.cs, and default.aspx.cs, but only
login.asx.cs will receive the Event, it will not give it up to the
default.aspx.

My problem is, if the user changing, i need to refresh the other control,
the shopbasket as well. How can I call the Parent's Eventhandler somehow in
login.ascx.cs' User_UserChanged() event handler?

thanks,

b.
 

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,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top