# Using the EmptyMessage Property

The **EmptyMessage** property lets you specify a string that will appear when the RadListBox contains no items.

![EmptyMessage property](https://www.telerik.com/products/aspnet-ajax/documentation/assets/b891cce9347a3311a3c33ed22de01a6d/listbox_empty_message.png)

## Setting the EmptyMessage server-side

```C#
protected void Page_Load(object sender, EventArgs e)
{
	RadListBox1.EmptyMessage = "No items added";
}				
```

```VB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
	RadListBox1.EmptyMessage = "No items added"
End Sub	
```

## Setting the EmptyMessage inline

```ASPNET
<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox2" runat="server"
	EmptyMessage="No items added">
</telerik:RadListBox> 	
```

## Controlling the appearance of the EmptyMessage text

To control the appearance of the **EmptyMessage** text you can add and change this CSS rule:

```XML
<style type="text/css">
	div.RadListBox .rlbEmptyMessage
	{
		font-weight : bold;
	}
</style> 	
```

In addition you can define your own template on how the empty message should look like by using the <**EmptyMessageTemplate**> tag. Just like the ItemTemplate you can place any html / asp.net controls in it and it will be shown when the RadListBox is empty. Here is an example:

```XML
<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox1" runat="server"
   Height="180px"         
   AllowTransferOnDoubleClick="true"
   Skin="Vista"
   AllowTransfer="True"
   TransferToID="RadListBox2">
   <Items>
	   <telerik:RadListBoxItem Text="Banana" />
	   <telerik:RadListBoxItem Text="Apple" />
	   <telerik:RadListBoxItem Text="Grapefruit" />
   </Items>
</telerik:RadListBox>
<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox2" runat="server"
   Height="180px" >
   <EmptyMessageTemplate>
	   <img src="empty-cart.png" alt="No items selected">
   </EmptyMessageTemplate>
</telerik:RadListBox> 	
```

And here is the result:

![Applying the EmptyMessageTemplate](https://www.telerik.com/products/aspnet-ajax/documentation/assets/8b055b595d19c299d094371eeede9fe9/listbox_emptymessagetemplate.png)

## See Also

* [Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/listbox/templates/overview)
