Stuff
public text v1 · immutable [AjaxPro.AjaxMethod]
public object[] OnAutoComplete(string value, int count)
{
try
{
string str = String.Format("SELECT TOP 10 SearchPhrase FROM SearchPhrase WHERE SearchPhrase LIKE '{0}%' ORDER BY SearchPhrase", value);
DbDataReader _reader = Common.ExecuteReader(CommandType.Text, str);
ArrayList _coll = new ArrayList();
while (_reader.Read())
{
_coll.Add((string)_reader["SearchPhrase"]);
}
_reader.Close();
return _coll.ToArray();
}
catch (Exception ex)
{
return null;
}