New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Declaring the Items Inline

The definition of RadListBox items can be added to the in-line declaration of the ListBox using the RadListBox Item Builder. The item builder updates the ASPX or ASCX file to include the list of items and their properties.

You can also directly edit the ASPX or ASCX file by adding items to the section of the RadListBox declaration. Every item definition must be enclosed in <telerik:RadListBoxItem> and </telerik:RadListBoxItem> tags.


Add the following inline definition of RadListBox to your ASPX or ASCX file:

<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox2"
       <telerik:RadListBoxItem Text="RadMenu" />
       <telerik:RadListBoxItem Text="RadComboBox" />
       <telerik:RadListBoxItem Text="RadListBox" Selected="true" />

At run-time the result will be:

Inline itemes

See Also

In this article