System.Web.UI.WebControls.ObjectDataSource.TypeName Property

Gets or sets the name of the class that the System.Web.UI.WebControls.ObjectDataSource object represents.

Syntax

[System.ComponentModel.DefaultValue("")]
public string TypeName { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

To create an instance of the object that the System.Web.UI.WebControls.ObjectDataSource control binds to, the control uses reflection to load the type that is identified by the type name at run time. Therefore, the value of the ObjectDataSource.TypeName property can be a partially qualified type for code that is located in the Bin or App_Code directories or a fully qualified type name for code that is registered in the global assembly cache. If you use the global assembly cache, you must add the appropriate reference to the assemblies section of the Machine.config or Web.config file.

The type must have a default constructor, unless you handle the ObjectDataSource.ObjectCreating event to create an instance of it yourself. An instance of the type is created for each call to the ObjectDataSource.Select, ObjectDataSource.Update, ObjectDataSource.Insert, and ObjectDataSource.Delete methods, if the methods on the type are member methods. An instance is not created if the methods are static (Shared in Visual Basic). If the type implements the IDisposable interface, the IDisposable.Dispose method is called before the object is destroyed.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0