Autocomplete TextBox in Asp.Net with C# -


can please me create autocomplete textbox in asp.net using c#. trying create end not working.

i used oracle 11g db.

below code

<asp:textbox id="textbox1" runat="server" autopostback="true"></asp:textbox>   <ajaxtoolkit:autocompleteextender servicemethod="getcompletionlist" minimumprefixlength="1"  completioninterval="10" enablecaching="false" completionsetcount="1" targetcontrolid="textbox1" id="autocompleteextender1" runat="server" firstrowselected="false">     </ajaxtoolkit:autocompleteextender>  c# code:  [webmethod]     [system.web.script.services.scriptmethod()]     [system.web.services.webmethod]     public static list<string> getcompletionlist(string prefixtext, int count)     {         return autofillproducts(prefixtext);      }     [system.web.script.services.scriptmethod()]     [system.web.services.webmethod]     private static list<string> autofillproducts(string prefixtext)     {         using (oracleconnection con = new oracleconnection("data source=172.30.16.30:1522/pundev11;password=nchannel;persist security info=true;user id=nchannel"))         {              using (oraclecommand com = new oraclecommand())             {                 com.commandtext = "select * thread " + "summary @search + '%'";                 com.parameters.addwithvalue("@search", prefixtext);                 com.connection = con;                 con.open();                 list<string> summ = new list<string>();                 using (oracledatareader sdr = com.executereader())                 {                     while (sdr.read())                     {                         summ.add(sdr["summary"].tostring());                     }                 }                 con.close();                 return summ;             }         }     } 


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -