IN MY opinion event are wired up with their event handler through the delegates only and we generally use the delegates for that purpose even though we have many other advantages also with delegates we can do ...
please let me know your opinioins also.....
Sam HobbsPosted Sep 11, 2010, 4:39 AM
Look at the Control.Click Event documentation. It says that the Click Event is:
Then look at EventHandler Delegate. Do you see that the Click Event is a delegate? Your initial question says "are the delegates and events are related in any sense" and I replied that "Events are delegates". It is not a matter of opinion; an event is a delegate, and you would know that if you looked at the documentation.
anu mathurPosted Sep 11, 2010, 4:17 AM
if you are not interested in any of the discussion you are not forced to give the reply ,so please dont try to make yourself distructive ,,,,and also i already told here i am looking the opnion of diferent peole for the same question as i want to know the ans people think.
Sam HobbsPosted Sep 10, 2010, 5:17 PM
I apologize for this reply being strong, but I don't know how else to get you to listen instead of arguing.
anu mathurPosted Sep 10, 2010, 4:02 AM
but here i am not looking for syntax as what u think i am not a beginner i am here to get the diiffernt views from the people who have extensive experience in OOPs concept.
Sam HobbsPosted Sep 7, 2010, 9:05 AM
So do your part. Look at the documentation of an event; what does the syntax for the event say? Post the syntax here.
anu mathurPosted Sep 7, 2010, 12:03 AM
can u please elaborate more your ans, by saying events are delegate what u want to specify?
anu mathurPosted Sep 7, 2010, 12:01 AM
for your quick reply but i dont understand why u specified just for user controls?
Sam HobbsPosted Sep 6, 2010, 3:06 PM
Manikavelu VelayuthamPosted Sep 6, 2010, 7:57 AM
For Example:
Consider you have a combo box in a User Control. You must need to call an event in ASPX page, once an item is selected from the combo box. In that case, you just need to declare a delegate in User Control, call the event from the combo box selected index changed event. That event will be available in the aspx page, as soon as the User control is placed in the aspx page. You can write your functionality there which will be automatically invoked once you select an item in the combo box