Search Icon in the textbox

2 posts, 1 answers
  1. L
    L avatar
    298 posts
    Member since:
    Apr 2008

    Posted 18 Aug 2012 Link to this post

    hi

    I would like to know how i get the search button into the textbox just like the one you have http://www.telerik.com/ or http://www.kendoui.com/get-help.aspx.  Thanks a lot
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Aug 2012 Link to this post

    Hi,

    With reference to this code library, you can add a search icon to the radtextbox as follows.
    aspx:
    <script runat="server">
    protected void btnSearch_Click(object sender, EventArgs e)
    {
     if (!String.IsNullOrEmpty(RadTextBox1.Text))
     lblLabel1.Text = String.Format("You searched for <strong>{0}</strong>.", RadTextBox1.Text);
     else
     lblLabel1.Text = "Type in the search box and click on the magnifying glass.";
    }
    </script>
    <div class="MySearch">
        <telerik:RadTextBox ID="RadTextBox1" runat="server" Skin="" CssClass="MyTextBox" Width="170px" />
        <asp:Button ID="btnSearch" runat="server" Text=" " ToolTip="Search" CssClass="MyButton" OnClick="btnSearch_Click" />
    </div>

    Thanks,
    Princy.
Back to Top