Binding GrdView from xml using LINQ
protected void Page_Load(object sender, EventArgs e)
{
XDocument xmlDoc = XDocument.Load(@"c:syntaxhelp.xml");
var q = from c in xmlDoc.Descendants("Topic")
where c.Attribute("technical").Value == "true"
select new
{
name = c.Element("name").Value,
url = c.Element("url").Value
};
gvSyntaxHelp.DataSource = q;
gvSyntaxHelp.DataBind();
}