Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have 2 tab name like search by restaurant and search by area ,and each tab i have 2 textboxes, in search by restaurant if i enter c mean it displays chennai , when i go to span 2( search by area) and enter value in textbox lik c ,it displays chennai .but when i come back to tab1(search by restaurant) and enter c it doesnt display chennai , y this problem is happening .Help me.in first time only it shows correctly
Posted
Comments
thatraja 26-Jan-12 7:44am    
Show code
priya from Madras 27-Jan-12 8:29am    
[System.Web.Services.WebMethodAttribute()]
[System.Web.Script.Services.ScriptMethodAttribute()]

public static string[] GetNames(string prefixText, int count)
{


DinnerNow.Services.MenuSearchService obj = new DinnerNow.Services.MenuSearchService();
string[] aut = obj.GetNames(prefixText, count);
return aut;

}

public string[] GetNames(string prefixText, int count)
{
Business.Menu menu = new DinnerNow.Business.Menu();
return menu.GetNames(prefixText, count);
}

public string[] GetNames(string prefixText, int count)
{

return db.Restaurants.Where(n => n.City.StartsWith(prefixText)).OrderBy(n => n.City).Select(n => n.City).Distinct().Take(count).ToArray();

}

1 solution

A well known problem.
You could try to reload on the return or disable and re-enable the auto complete...

AutoCompleteType="Disabled" or AutoComplete="Off"
 
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