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

Default Message

Default Message property of the RadDropDownList enables the ability to set control's text if no item is selected. The Default Message property could be very useful, when one needs to provide more information about the content of the RadDropDownList. This text is not visible when the control gets the focus and appears again on blur if no item is selected.

Setting the Default Message in the markup code

<telerik:RadDropDownList RenderMode="Lightweight" ID="RadDropDownList1"
     runat="server"
     AutoPostBack="true"
     DefaultMessage="Select an item">
</telerik:RadDropDownList>

Setting the Default Message server-side

protected void Page_Load(object sender, EventArgs e)
{
    RadDropDownList1.DefaultMessage = "Select an item";
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

    RadDropDownList1.DefaultMessage = "Select an item"

End Sub

Setting the Default Message client-side

var dropdownlist = $find("<%= RadDropDownList1.ClientID %>");
dropdownlist.set_defaultMessage("Select an item");

Additionally, you can get the Default Message property client-side by calling the get_defaultMessage() method of the dropdownlist.

In this article