 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

May 23rd, 2010, 01:22 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Elaboration for delegate
Hi Imar
I really have problem by Delegate(in C#) and event handler and their arguments.can you elaborate this?
|
|

May 23rd, 2010, 05:09 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you post questions not directly related to the book in a general ASP.NET category here: http://p2p.wrox.com/asp-net-4-539/ ? If it is book related, please post a chapter or page number.
If you do repost there, be sure to be more explicit with what you ask as your current question is pretty vague.
In the mean-time, maybe this helps: http://www.google.com/#hl=en&source=...7ecd1ca1f09b98
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

May 23rd, 2010, 05:22 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Yes its page 188 (Events)
I now Event what to do but I don't now whats different bitween function and Event handler
Other Problem is that i do not now its(Event Handler) parameter use can you describe it details .
thanks
|
|

May 23rd, 2010, 05:25 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Oh OK i do your says for later
I am sorry.
|
|

May 23rd, 2010, 09:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No problem at all. Things just get easier for everyone if you post in the right category and ask detailed questions.
An event handler is a method designed to handle an event. By itself it's nothing special as it's a normal method with two parameters. However, whenthey are hooked up / linked to an event, they are called automatically when that event occurs.
A typical event handler accepts two parameters: sender which is often the object that caused the event to fire and e (which often is, or inherits from System.EventArgs) to provide extra data for the event.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

May 24th, 2010, 11:31 PM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Thank's I understood it.
|
|

June 6th, 2010, 12:16 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Hi imar,
In event handler such as page_load , it have two arguments:
1- sender (object)
2- e(EventArgs)
I know sender here is the form, but i don't know What is the e .
Thanks
|
|

June 6th, 2010, 06:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
and e (which often is, or inherits from System.EventArgs) to provide extra data for the event.
|
In the case of Page_Load, e is just an empty handler of type System.EventArgs that adds no value, other than to stick to the standard rules of a sender and an e argument for event handlers.
Cheers,
Imar
|
|
 |
|