I want to make a search textbox like this:
http://www.freeimagehosting.net/65b24
But, I don't know how. Any help is appreciated. Thank you.
How to make a search textbox in c#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

nishant ranjanRank #4,961 · 317 reputationPosted Nov 12, 2011, 12:04 AM EST
{
string qry = "";
qry = string.Format("select * from TABLE NAME where 1=1");
if (txt_name.Text != "")
{
qry = qry + "and name='" + txt_name.Text + "'";
}
// bind the grid view, if want to show search result in grid view or where ever you want
sql_detail.SelectCommand = qry;
gv_detail.DataBind();
if (gv_detail.Rows.Count > 0)
{
lbl_msg.Text = "";
lbl_msg.Visible = false;
}
else
{
lbl_msg.Text = "No Matching Result Found";
lbl_msg.Visible = true;
}
}
catch (Exception ex)
{
lbl_exception = Master.FindControl("lbl_Exception") as Label;
lbl_exception.Text = ex.Message;
}
in design side
make a textbox and a button and above code should be in click event of that button
try out
nishant ranjanRank #4,961 · 317 reputationPosted Nov 12, 2011, 12:06 AM EST
Manoj SevdaRank #1,670 · 916 reputationPosted Nov 12, 2011, 12:39 AM EST
Try with telerik control, mostly Telerik dropdownlist.