New to Telerik UI for ASP.NET AJAX? Start a 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
Example
Add the following inline definition of RadListBox to your ASPX or ASCX file:
ASPNET
<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox2"
runat="server"
Skin="Vista">
<Items>
<telerik:RadListBoxItem Text="RadMenu" />
<telerik:RadListBoxItem Text="RadComboBox" />
<telerik:RadListBoxItem Text="RadListBox" Selected="true" />
</Items>
</telerik:RadListBox>
At run-time the result will be: