Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is "search textbox" has same function with the "textbox" coded with autocomplete? :confused:
Posted

Normal text boxes doesn't contain any autocomeletly functionaly you have eiter to creat your own, or use exisitng ones over the internet
check this

http://jamesgeraldlgayo.webng.com/dhtmlcombobox/DHTMLCombobox.htm[^]
 
Share this answer
 
Hi Team;
autocomplete search textbox?
Hope It Will Help You .


Don't Forget To Vote ;)

Normal text boxes doesn't contain any autocomeletly functionaly you have eiter take the helpe of Ajax/Jquery.

For Ajax You Must write a web method
1)


[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]

public string[] GetCompletionList( string prefixText, int count)
{
DataTable dt = objBAL.GetDataSet("select Product_name from tbl_product where Product_name like '" + prefixText + "%'").Tables[0];
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (DataRow dr in dt.Rows)
{
items.SetValue(dr[0].ToString(), i);
i++;
}

return items;

}

How you consume the method
Call the method in AutoCompleteExtender(ServiceMethod)
<cc1:AutoCompleteExtender runat="server"
ID="autoComplete1"
TargetControlID="txtDGName"
ServiceMethod="GetCompletionList"
ServicePath="~/WebService.asmx"
MinimumPrefixLength="1"
CompletionInterval="1000"
EnableCaching="true"
CompletionSetCount="20"
ShowOnlyCurrentWordInCompletionListItem="true">
<Animations>
</Animations>
</cc1:AutoCompleteExtender>





Thank's
Prasanta Kumar Pradhan
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900