using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Threading; public partial class lugeja2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { String[] aadressid ={ "http://www.epl.ee/rss", "http://www.postimees.ee/rss" }; List pealkirjad = new List(); /* GridView1.DataSource = from dokument in (from aadress in aadressid select XDocument.Load(aadress)) select dokument.Descendants("title").Count(); */ var dokumendid = from aadress in aadressid select XDocument.Load(aadress); foreach (var dokument in dokumendid) { foreach (var element in dokument.Descendants("item")) { pealkirjad.Add(element.Element("title").Value.varvi("green")); } } GridView1.DataSource = pealkirjad; GridView1.DataBind(); } }