BaseDataList Control in ASP.NET


Today I seen BaseDataList in MSDN Tutorial. But I am confuse about BaseDataLIst control / class. Is it concept or web form control ?
or
Is it base class for DataControls in asp.NET ?

According to msdn they were showing its similar to DataList and DataGrid controls.
BaseDataList description also available from .Net 2.0 to till now.

Don't search for BaseDataList in Toolbox of Visual Studio because its a Class and DataList concept.

It is not a control, it's an abstract class meaning that it provides base functionality that must be inherited by another class to be used. In this case it provides common functionality for the DataList and DataGrid controls so that methods like GetData and events like SelectedIndexChanged are available to both.

Constructor :

A BaseDataList object is not created directly. This constructor is commonly called in the constructor of a derived class to initialize the properties defined in the BaseDataList class.

Use :

Use the Controls collection to manage the child controls contained in a data listing control. You can add controls, remove controls, or iterate through the server controls in the collection
BaseDataList contains following properties that enable formatting the gridview and its content
 -  Cellpadding
 -  Cellspacing etc..

Instance of BasedataList class are not directly created.The constructor is called during construction of derived classes to initialize properties defined in BaseDataList class.

Example :

Creating BaseDatalist in C#


[Note : Links are provided for more information]

[Discussion is an exchange of knowledge, argument is an exchange of ignorance....!]
 

Comments

Popular posts from this blog

Add Serial no in crystal report without coding

Working with Oracle's BLOB and Microsoft's C#

File operations in C# (.net)