【发布时间】:2011-08-15 15:52:19
【问题描述】:
我正在尝试在 TextBox 中进行自动建议,并且我使用了 Ajax 控件来执行此操作。我给电影数组一些值。我想通过使用用户用于登录网站的电子邮件 ID 过滤用户表来从数据库中提供该值。我无法将 Label 值调用到下面的方法中。我在页面加载期间将用户的电子邮件 ID 存储在标签中。帮我做。
[System.Web.Services.WebMethodAttribute(),System.Web.UI.WebControls, System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
// Create array of movies
string[] movies = {"Joey", "Joester", "Joker", "Joeic", "Joic", "Shrek II"};
// Return matching movies
return (from m in movies where m.StartsWith(prefixText,StringComparison.CurrentCultureIgnoreCase) select m).Take(count).ToArray();
}
【问题讨论】:
标签: c# asp.net ajax ajaxcontroltoolkit