SearchBox - Client-side Templates

Call us at or come to on

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

RadSearchBox provides support for client templates. The template itself contains mark up and/or binding expressions which are evaluated against a DataItem and then rendered on the client.

  • DefaultCS.aspx
  • scripts.js
  • styles.css
<%@ Page Inherits="Telerik.QuickStart.QsfPage"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src="scripts.js"></script>

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

    <div class="demo-container no-bg">

        <telerik:RadODataDataSource runat="server" ID="RadODataDataSource1">
                <Read Url="" DataType="JSONP"></Read>
                <telerik:DataModel ModelID="Dinner" Set="Dinners">

        <div class="searchBoxContainer">

            <telerik:RadSearchBox RenderMode="Lightweight" runat="server" ID="RadSearchBox1" Width="350" Skin="Silk"
                DataTextField="Title" OnClientSearch="OnClientSearch"
                ODataDataSourceID="RadODataDataSource1" DataKeyNames="Title" DataModelID="Dinner">
                <DropDownSettings Height="400px">
                    <h3>#= Text #</h3>
                    <div class="details">
                        <img src="icon_list.png" alt="Alternate Text" style="float:left; height:36px; width:36px;" />
                        <span class="info">
                                <b>Hosted By:</b> #= DataItem.HostedBy #<br>
                                <b>Contact Phone:</b> #= DataItem.ContactPhone #

        <div class="dinnerDetails">
            <p class="description"></p>
                Call us at
            <span class="phone"></span>
                or come to
            <span class="address"></span>
                on <span class="date"></span>
        <div class="map">


Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?