Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i am using ajax autocomplete extender for outo fill my textboxe .

look here

C#
public string[] ReturnItem(string prefixText)
{
  string str1 = 'select Item from SCM_BalPo where Item LIKE ' + prefixText + '%';
  ds1 = objDl.returnDataSet(str1, 'Item');
  items1 = new string[ds1.Tables['Item'].Rows.Count];
  for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
  {
	  items1[i] = ds1.Tables[0].Rows[i].ItemArray[0].ToString();
  }
  return items1;
}
[WebMethod]
public string[] ReturnSiteId(string prefixText1)
{
  string str = 'select SiteId from SA_Client where SiteId LIKE ' + prefixText1 +'%';
  ds = objDl.returnDataSet(str, 'SiteID');
  items = new string[ds.Tables['SiteID'].Rows.Count];
  for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
  {
	   items[i] = ds.Tables[0].Rows[i].ItemArray[0].ToString();
  }
  return items;
}


in above i have two methods are ReturnItem,ReturnSiteId for filling two textboxs

ReturnSiteId method not working i cant find where is problem please help me if i put ReturnSiteId at starting position in code it will working fine but that time ReturnItem method is not working

simply , only one method working at a time which is put frist in mycode
Posted
Updated 15-Feb-11 1:07am
v2

Can you post here piece of html code too?

For testing purpose, put the both method in different .asmx file and check the result.


Thanks
 
Share this answer
 
Hi,

Follow the below link,It will help you to solve the issue.

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/AutoComplete/AutoComplete.aspx[^]

Regards,
Kiran.
 
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