Click here to Skip to main content
15,910,877 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAccess file under inetpub Pin
siva4553-Feb-09 20:46
siva4553-Feb-09 20:46 
AnswerRe: Access file under inetpub Pin
Spunky Coder3-Feb-09 21:39
Spunky Coder3-Feb-09 21:39 
AnswerRe: Access file under inetpub Pin
Ranjit Viswakumar4-Feb-09 12:26
Ranjit Viswakumar4-Feb-09 12:26 
GeneralRe: Access file under inetpub Pin
siva4554-Feb-09 16:40
siva4554-Feb-09 16:40 
QuestionMemmory allocation to perticular method Pin
Imran Khan Pathan3-Feb-09 20:29
Imran Khan Pathan3-Feb-09 20:29 
QuestionSending email - error in asp.net Pin
ashok@techxygen3-Feb-09 20:17
ashok@techxygen3-Feb-09 20:17 
AnswerRe: Sending email - error in asp.net Pin
SeMartens3-Feb-09 22:09
SeMartens3-Feb-09 22:09 
QuestionXML in ASP.NET Pin
.NET- India 3-Feb-09 20:10
.NET- India 3-Feb-09 20:10 
Hello Friends,

I've a XML file having data as shown below and i want to display this data in GridView using the XMLDataSource. Actually i want to show the record where Active is 1
<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>AA</Video>
<VideoTitle>AA</VideoTitle>
<Description>AA</Description>
<Guru>AA</Guru>
<Lord>AA</Lord>
<Category>AA</Category>
<Genre>AA</Genre>
<Tag>AA</Tag>
<Active>1</Active>
</Videos>
</TotalBhakti>



XML Data Source code is here
<asp:XmlDataSource ID="TotalBhakti" runat="server" XPath="TotalBhakti/Videos" DataFile="~/XMLFiles/XMLFile1.xml"></asp:XmlDataSource>

and
GridView Code is here
<asp:GridView ID="GridView1" Runat="server" DataSourceID="TotalBhakti" AutoGenerateColumns="False">
<Columns>
<asp:BoundField HeaderText="ID" DataField="ID"></asp:BoundField>
<asp:BoundField HeaderText="Video" DataField="Video"></asp:BoundField>
</Columns>
</asp:GridView>

But i get no data in GridView and also if i remove the XPath from the XMLDatasource then i get an error like "ID" field not found in the DataSource please suggest me the way to come out of this problem.
AnswerRe: XML in ASP.NET Pin
SeMartens3-Feb-09 22:14
SeMartens3-Feb-09 22:14 
GeneralRe: XML in ASP.NET Pin
.NET- India 4-Feb-09 0:04
.NET- India 4-Feb-09 0:04 
GeneralRe: XML in ASP.NET Pin
SeMartens4-Feb-09 0:08
SeMartens4-Feb-09 0:08 
GeneralRe: XML in ASP.NET Pin
.NET- India 4-Feb-09 0:15
.NET- India 4-Feb-09 0:15 
GeneralRe: XML in ASP.NET Pin
SeMartens4-Feb-09 1:30
SeMartens4-Feb-09 1:30 
QuestionMaster Page related question.. Pin
mr_muskurahat3-Feb-09 19:29
mr_muskurahat3-Feb-09 19:29 
AnswerRe: Master Page related question.. Pin
Christian Graus3-Feb-09 19:30
protectorChristian Graus3-Feb-09 19:30 
QuestionGMAPS Question Pin
Krazy Programmer3-Feb-09 19:09
Krazy Programmer3-Feb-09 19:09 
AnswerRe: GMAPS Question Pin
Christian Graus3-Feb-09 19:14
protectorChristian Graus3-Feb-09 19:14 
GeneralRe: GMAPS Question Pin
Krazy Programmer3-Feb-09 21:47
Krazy Programmer3-Feb-09 21:47 
AnswerRe: GMAPS Question Pin
Abhishek Sur3-Feb-09 20:45
professionalAbhishek Sur3-Feb-09 20:45 
GeneralRe: GMAPS Question Pin
Krazy Programmer3-Feb-09 21:49
Krazy Programmer3-Feb-09 21:49 
GeneralRe: GMAPS Question Pin
Abhishek Sur4-Feb-09 21:46
professionalAbhishek Sur4-Feb-09 21:46 
QuestionShare Point Pin
nikhil12343-Feb-09 18:47
nikhil12343-Feb-09 18:47 
AnswerRe: Share Point Pin
Christian Graus3-Feb-09 19:29
protectorChristian Graus3-Feb-09 19:29 
AnswerRe: Share Point Pin
Ranjit Viswakumar4-Feb-09 12:31
Ranjit Viswakumar4-Feb-09 12:31 
Questionweb parts created in VS2005 Pin
bishwambhar_sen3-Feb-09 18:40
bishwambhar_sen3-Feb-09 18:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.