Provides data for the ContextDisposing event.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
You create a handler for the ContextDisposing event to perform clean-up that is specific to the data context object before the object is destroyed. The object contains the data context object that is used when you are selecting, updating, inserting, or deleting data. The ContextDisposing event is raised during the Unload event before the LinqDataSource control disposes the context object.
When the LinqDataSource control interacts with a database, the ContextTypeName property is set to the DataContext object that represents the database. When the LinqDataSource control interacts with an in-memory data collection, the ContextTypeName property is set to the object that contains the data collection.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2