string connString =ConfigurationManager.ConnectionStrings["Autofill"].ToString(); // Autofill is database name string selectString ="SELECT *from Station";
List<String>CustList=newList<string>(count); using (SqlConnection sqlConn =newSqlConnection(connString)) { sqlConn.Open();
using (SqlCommand sqlCmd =newSqlCommand(selectString, sqlConn)) { SqlDataReader reader = sqlCmd.ExecuteReader(); while(reader.Read()) CustList.Add(reader["DBRT"].ToString());//DBRT is the Column name
} } return(CustList.ToArray());
When i execute and run the program nothing happens. I dont know what has went wrong. Please guide me.
you're missing the scriptserviceattribute on the web service class. this is a new attribute which has been in beta 1 and it must be added to the class in order for the method to be called.
aditya_22cen...
0 Points
1 Post
Ajax autocomplete not complete
Jun 26, 2012 04:16 AM|LINK
I have wriiten a simple ajax autocomplete code in Asp.net ( C#)
This is the code
default.aspx AJAX
When i execute and run the program nothing happens. I dont know what has went wrong. Please guide me.
C ajax
cachet.net
Member
463 Points
110 Posts
Re: Ajax autocomplete not complete
Jun 26, 2012 06:33 AM|LINK
If this is your service method "GetCompletionList"
just add
[WebMethod]
public list<string> abc()
{
-----------
}
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: Ajax autocomplete not complete
Jun 27, 2012 03:22 AM|LINK
you're missing the scriptserviceattribute on the web service class. this is a new attribute which has been in beta 1 and it must be added to the class in order for the method to be called.
Refer this
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
http://verysimple.com/2007/04/18/ajax-toolkit-autocomplete-extender-not-firing/
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.