Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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
 
Old November 24th, 2010, 01:48 AM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default EventArgs Object

Hi there
I have question about EventArgs Classes:
For example assume DataListItemEventArgs class and its object( e).is it true we say that this class has information for object that sends event?
Thanks.
 
Old November 24th, 2010, 03:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It contains information that can be relevant for both the sender (the object that raises the event) and the receiver (the object that handles it) or only one of them,

Sometime, the EventArgs contains information that is created by the sender and is read-only to the receiver. Consider the X and Y arguments of an ImageClickEventArgs class for example. They can't be changed by the receiver.

In other cases, the receiver can change the information on the EventArgs so the sender can do soemthing with that information. For example, event args classes that expose a Cancel property enable the receiver to determine whether the sender should continue with some action or not.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
morteza (November 24th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 06:14 AM
EventArgs with Text/Value properties bmains General .NET 1 August 2nd, 2005 05:34 AM
"Sender As Object, E As EventArgs) anpham ASP.NET 1.0 and 1.1 Basics 3 July 7th, 2005 08:34 AM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 06:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.