using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.ServiceModel.Syndication; public partial class otsija : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //System.Xml.XmlReader lugXML = System.ServiceModel.Syndication.SyndicationFeed voog = SyndicationFeed.Load(System.Xml.XmlReader.Create("http://www.epl.ee/rss")); GridView2.DataSource = voog.Items.Where(x => x.Title.Text.Contains("ai")). Select(x => new { x.Title.Text, Link = x.Links.First().Uri.AbsoluteUri }); GridView2.DataBind(); for (int i = 0; i < 3; i++) { } } [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()] public static string[] GetCompletionList(string prefixText, int count, string contextKey) { DataClassesDataContext dc = new DataClassesDataContext(); //return (dc.isikuds.Where(x => x.eesnimi.ToLower(). // StartsWith(contextKey.ToLower())). // Select(x => x.eesnimi + " " +x.perekonnanimi).ToArray()); return (from isik in dc.isikuds where isik.eesnimi.ToLower().StartsWith(prefixText.ToLower()) select isik.eesnimi.Substring(0, 1) + ". " + isik.perekonnanimi).ToArray(); // return default(string[]); // return new string[] { "tere", "tulemast" }; //Looge andmetabel //näidake välja need kirjed, mis sisaldavad etteantud teksti } }