Export (0) Print
Expand All

DataList Constructor

Initializes a new instance of the DataList class.

[Visual Basic]
Public Sub New()
[C#]
public DataList();
[C++]
public: DataList();
[JScript]
public function DataList();

Remarks

Use this constructor to create and initialize a new instance of the DataList class.

Example

[Visual Basic, C#, C++] The following example demonstrates how to create and initialize a new instance of the DataList class.

[Visual Basic] 
Sub Page_Load(sender As Object, e As EventArgs)
    Dim MyList As New DataList()
End Sub 'Page_Load

[C#] 
void Page_Load(Object sender, EventArgs e) 
{
   DataList MyList = new DataList();
}
   

[C++] 
void Page_Load(Object* /*sender*/, EventArgs* /*e*/) 
{
   DataList* MyList = new DataList();
}
   

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

DataList Class | DataList Members | System.Web.UI.WebControls Namespace

Show:
© 2014 Microsoft