TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manoj Bisht
NA
145
0
XML with GridView
Feb 4 2009 4:48 AM
Hello Freinds,
I've a GridView in which i'm fetching the data from the XMLFile.
My XML file is shown below. In this XML file i've a Active node and i want to display only the data where the
Active is 1
that's mean to fetch only first record but it's bringing all records.
<TotalBhakti>
<Videos>
<ID>1</ID>
<Video>No Video(s)</Video>
<VideoTitle>No Video Title</VideoTitle>
<Description>No Description</Description>
<Guru>No Guru</Guru>
<Lord>No Lord</Lord>
<Category>No Category</Category>
<Genre>No Genre</Genre>
<Tag>No Tag</Tag>
<Active>1</Active>
</Videos>
<Videos>
<ID>2</ID>
<Video>No Video(s)</Video>
<VideoTitle>No Video Title</VideoTitle>
<Description>No Description</Description>
<Guru>No Guru</Guru>
<Lord>No Lord</Lord>
<Category>No Category</Category>
<Genre>No Genre</Genre>
<Tag>No Tag</Tag>
<Active>0</Active>
</Videos>
</TotalBhakti>
here is the code to display in the
GridView
XmlDataSource data = new XmlDataSource();
data.DataFile = Server.MapPath("~/XMLFiles/XMLFile1.xml");
GridView1.DataSource = data;
GridView1.DataBind();
Reply
Answers (
1
)
XModem over a socket connection?
System.Data.ConstraintException Question