473,503 Members | 5,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in retrieving data from a XML file

56 New Member
Problem in retrieving data from a XML file.......this is my code-

Expand|Select|Wrap|Line Numbers
  1. protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.  
  4.         DataSet ds = new DataSet();
  5.         ds.ReadXml(MapPath("prod.xml"));
  6.         DataGrid grid1 = new DataGrid();
  7.         grid1.DataSource = ds;
  8.         grid1.DataBind();
  9.  
  10.  
  11.     }
  12.  
  13. <?xml version="1.0" encoding="utf-8" ?>
  14. <Productlist>
  15.   <Products>
  16.     <ProductID>1</ProductID>
  17.     <Name>pro1</Name>
  18.   </Products>
  19.   <Products>
  20.     <ProductID>2</ProductID>
  21.     <Name>pro22</Name>
  22.   </Products>
  23. </Productlist>
  24.  
  25. <asp:GridView ID="grid1" runat="server">
  26.         </asp:GridView>
Jun 26 '08 #1
7 2705
RedSon
5,000 Recognized Expert Expert
Next time please use code tags. It is not a request.
Jun 26 '08 #2
splendid9
56 New Member
what code tags..............? do u know solution for my problem?
Jun 26 '08 #3
RedSon
5,000 Recognized Expert Expert
If you click on post reply, read the reply guidelines!
Jun 26 '08 #4
splendid9
56 New Member
ok is my ques deleted now? i am not getting any replies???????
Jun 27 '08 #5
RedSon
5,000 Recognized Expert Expert
ok is my ques deleted now? i am not getting any replies???????
No its not deleted, if you can read it so can everyone else. I'll move it to the XML forum to see if you get a better response.
Jun 27 '08 #6
jkmyoung
2,057 Recognized Expert Top Contributor
Could you be more specific in terms of the problem? Are you getting error messages? Is any of the data loaded?
Jun 27 '08 #7
splendid9
56 New Member
No i am not getting any error messages, just a blank aspx page,.....without any data...i am just trying to display the data from xml file onto aspx page,...
Jun 27 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3635
by: Navin | last post by:
hi, i am using the follwoing code to write a recordset to a csv file 'fcreateFile -file system object Do While Not oRs.EOF fcreateFile.Write(oRs.GetString(,1000,",",vbcrlf,"")) 'Write Login...
7
2899
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the...
0
1227
by: kid4rilla | last post by:
I can successfully write the binary data to an image data type, and successfully retrieve it, but when I attempt to play the file in media player after retrieving it, I get the file type isn't...
12
1845
by: Joel Byrd | last post by:
I am making an AJAX call when any one of a number of inputs in a form (search criteria) are clicked, checked, changed, etc. When the user clicks, checks, whatever, I am trying to display a...
3
6155
by: Rajendran | last post by:
Hi all, I've installed pyodbc module to access my database (MS Access). I've setup a User level DSN to the database.mdb file. When I run my python code in the command prompt it is retrieving the...
7
2830
by: souravmallik | last post by:
Hello, I'm facing a big logical problem while writing a parser in VC++ using C. I have to parse a file in a chunk of bytes in a round robin fashion. Means, when I select a file, the parser...
0
3357
by: mgilligan | last post by:
Hi I am having a problem and can not for the life of me figure out what is wrong. I have a program that iterates through every file in a directory using FindFirstFile and FindNextFile and add them...
36
4752
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset...
0
1597
by: mahdaeng | last post by:
I have a little Windows application written in C# with a SQLite back- end. I'm using the System.Data.SQLite provider. One of the features the application provides is a database back-up, which...
0
7188
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.