954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

AjaxControlToolkit AutoCompleteExtender not working in IIS

Hi,

I am using the AjaxControlToolkit's AutoCompleteExtender without a Web Service(PageMethod). It is working fine on my local machine, but AutoCompleteExtender won't work in the IIS but other AjaxControlToolkit does.

I've searched around but none applies to my problem.

It is running in IIS-6, and Framework 4.0.

Heres my code:
ASP

<!-- Auto Suggestion -->
<ajaxToolkit:AutoCompleteExtender 
	runat="server" 
	ID="ajaxAutoCompleteEmpNo" 
	ServiceMethod="GetCompletionList" 
	TargetControlID="txtEmpNo" 
	MinimumPrefixLength="1" 
	CompletionInterval="100" 
	CompletionSetCount="10" >
</ajaxToolkit:AutoCompleteExtender>
// Auto complete method
[System.Web.Script.Services.ScriptMethod]
[System.Web.Services.WebMethod]
public static string[] GetCompletionList(string prefixText, int count)
{

	List<string> strResult = new List<string>();
	OdbcConnection con = new OdbcConnection(ConfigurationManager.ConnectionStrings["csdbETSMain"].ConnectionString);
	con.Open();

	OdbcCommand cmd = new OdbcCommand("SELECT EmpNo FROM dbetsmain.tblusers WHERE EmpNo LIKE ? LIMIT ?", con);
	cmd.Parameters.Add("EmpNo",OdbcType.VarChar, 4).Value = prefixText + '%';
	cmd.Parameters.Add("Limit", OdbcType.Int).Value = count;

	OdbcDataReader dr = cmd.ExecuteReader();
	while (dr.Read())
	{
		strResult.Add(dr.GetValue(0).ToString());
	}


	return strResult.ToArray();
}


Please help

yorro
Junior Poster
121 posts since Aug 2009
Reputation Points: 8
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: