Use below code .... it will speed up your execution a while ....
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static List<string> GetCountries(string prefixText, int count)
{
DataTable dt = new DataTable();
User objUser = new User();
dt = objUser.GetDatatable();
prefixText = prefixText.ToUpper();
var query = (from DataRow r in dt.Rows
let DeptName = r.Field<string>("DeptName")
where DeptName.ToUpper().Contains(prefixText)
select DeptName).Take(5).ToList();
return query;
}
Try to execute this logic in sql server rather then trying to keep the result in cache... that will be the best solution ...... :D