Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Services;
- namespace aspnet4MichalKliment
- {
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [System.ComponentModel.ToolboxItem(false)]
- // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
- [System.Web.Script.Services.ScriptService]
- public class WebService1 : System.Web.Services.WebService
- {
- [WebMethod]
- [System.Web.Script.Services.ScriptMethod]
- public List<string> GetCities(string prefixText, int count)
- {
- return (from r in StaticLibrary.Cities where r.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) select r).Take(count).ToList();
- }
- //[WebMethod]
- //[System.Web.Script.Services.ScriptMethod]
- //public string[] GetCompletionList(string prefixText, int count, string contextKey)
- //{
- // //List<String> Return = SearchList.GetSearchList(HttpContext.Current.Session["sTown"].ToString());
- // return (from r in StaticLibrary.Cities where r.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) select r).Take(count).ToArray();
- //}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement