This is a migrated thread and some comments may be shown as answers.

Search Icon in the textbox

1 Answer 494 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 18 Aug 2012, 12:13 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 Aug 2012, 05:17 AM
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.
Tags
General Discussions
Asked by
L
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or