Shalni
Shalni

Reputation: 1027

How to call the event of usercontrol in page of aspx

I have created the usercontrol. There is event :

public event System.EventHandler MemberSelectionChanged; 

I have called this event in aspx page like this(given below). It working fine. Is there any other way to call the user control event in aspx page.

this.ucMemberList.MemberSelectionChanged += new EventHandler(MemberList_MemberSelectionChanged);

Upvotes: 0

Views: 1588

Answers (1)

TarasB
TarasB

Reputation: 2428

Shalni, if under "calling" you mean assigning handler to an event, so you did it right way. Not aware of other ways.

Upvotes: 1

Related Questions