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

Server-side Events

Event log

Server events supported by RadSearchBox are:

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="SearchBox.Examples.Programming.ServerEvents.DefaultVB" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

        <div class="demo-container size-thin">
            <telerik:RadSearchBox RenderMode="Lightweight" ID="RadSearchBox1" runat="server" Width="300px"
                DataSourceID="SqlDataSource1"
                EmptyMessage="Search for product"
                DataKeyNames="UnitPrice"
                DataValueField="ProductId"
                DataTextField="ProductName"
                OnButtonCommand="RadSearchBox1_ButtonCommand"
                OnDataSourceSelect="RadSearchBox1_DataSourceSelect"
                OnSearch="RadSearchBox1_Search"
                ShowSearchButton="true">
                <Buttons>
                    <telerik:SearchBoxButton ImageUrl="../../images/icon_globe.png" CommandName="Globe"
                        CommandArgument="globe" Position="Left" AlternateText="globe" />
                    <telerik:SearchBoxButton ImageUrl="../../images/icon_favourites.png" CommandName="Favorites"
                        CommandArgument="favorites" Position="Right" AlternateText="favorites" />
                </Buttons>
                <DropDownSettings Height="400" Width="300" />
            </telerik:RadSearchBox>
        </div>

        <qsf:EventLogConsole runat="server" ID="EventLogConsole1" AllowClear="true" />

    </telerik:RadAjaxPanel>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Products]"></asp:SqlDataSource>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance