Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
2881 Points
517 Posts
Apr 09, 2012 01:43 PM|LINK
Try this it should work for you.
In Default.aspx.cs
XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Request.MapPath("~/App_Data/FoothBall.xml")); XmlNodeList nodList = xmlDoc.SelectNodes("//sport/group[@status='Open']"); DataList1.DataSource = nodList; DataList1.DataBind();
avinash_bhud...
Contributor
2881 Points
517 Posts
Re: Check the Attribute in element and then show Data
Apr 09, 2012 01:43 PM|LINK
Try this it should work for you.
In Default.aspx.cs
XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Request.MapPath("~/App_Data/FoothBall.xml")); XmlNodeList nodList = xmlDoc.SelectNodes("//sport/group[@status='Open']"); DataList1.DataSource = nodList; DataList1.DataBind();