function OnUserChange(s, e) { $(s.GetInputElement()).autocomplete({ source: function (request, response) { $.ajax({ type: 'POST', contentType: "application/json; charset=utf-8", url: global.path + '/Mail/NewMail.aspx/GetUsers', data: "{'keyword':'" + request.term + "'}", dataType: "json", async: false, success: function (data) { data = jQuery.parseJSON(data.d); response($.map(data, function (item) { return { label: item.FullName, value: item.FullName, id: item.UserID } })) } }); } }); }
[WebMethod] public static string GetUsers(string keyword) { User user = new User(); string jsonData = JsonConvert.SerializeObject(user.GetAllUsers(keyword)); return jsonData; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)