473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Select data from database and display it as xml format in aspx page

Hi all,

I retrieved data from database and i want to display the retrieved data in xml format in aspx page using asp.net and c#.net...

Please get me the code.. i am using asp.net and c#.net


I want to use WebClient....

Thanks and Regards,

NewToDotNet..
Mar 10 '08 #1
11 2526
Plater
7,872 Expert 4TB
Do you have an XML schema created?

Although you could jsut use the built in functionality of DataTables and do .WriteXML() and use a stream object (possibly the response stream?) and write out your data.
Mar 10 '08 #2
nateraaaa
663 Expert 512MB
Hi all,

I retrieved data from database and i want to display the retrieved data in xml format in aspx page using asp.net and c#.net...

Please get me the code.. i am using asp.net and c#.net


I want to use WebClient....

Thanks and Regards,

NewToDotNet..
I don't really understand what you are wanting to do. Are you wanting to use a web service to return the data from the database and pass the data back to your website via a XML web service response? Or are you trying to retrieve the data from a database fill a dataset and use the dataset and show the data as XML nodes on your web page?

Nathan
Mar 10 '08 #3
I don't really understand what you are wanting to do. Are you wanting to use a web service to return the data from the database and pass the data back to your website via a XML web service response? Or are you trying to retrieve the data from a database fill a dataset and use the dataset and show the data as XML nodes on your web page?

Nathan
Hi Nathan,

I am trying to retrieve the data from a database fill a dataset and use the dataset and show the data as XML nodes on a web page.

I need to use WebClient in my code...

Please help me...

Thanks..
Mar 10 '08 #4
Plater
7,872 Expert 4TB
Then I say again:
Use the .WriteXML() function and supply your own stream for it.
Mar 10 '08 #5
Then I say again:
Use the .WriteXML() function and supply your own stream for it.
Hi Plator,

I dont know how to use WriteXML.() .. Please help me.. I am new in .net and please get me the source code for my requirement,,,

Thanks..
Mar 10 '08 #6
Plater
7,872 Expert 4TB
Check MSDN, it's good.

Quick and dirty:
Expand|Select|Wrap|Line Numbers
  1. myDataTable.WriteXML(Response.OutputStream);
  2. Response.End();
  3.  
But you could always populate a different stream, and properly set all the response headers (length, content type) and then feed that stream to the output stream.
Mar 10 '08 #7
Check MSDN, it's good.

Quick and dirty:
Expand|Select|Wrap|Line Numbers
  1. myDataTable.WriteXML(Response.OutputStream);
  2. Response.End();
  3.  
But you could always populate a different stream, and properly set all the response headers (length, content type) and then feed that stream to the output stream.

Hi,
Can yu get me the url in msdn??


Thanks...
Mar 10 '08 #8
Plater
7,872 Expert 4TB
You make me bang my head on the desk.

http://www.msdn.com/
Mar 10 '08 #9
nateraaaa
663 Expert 512MB
You make me bang my head on the desk.

http://www.msdn.com/
Don't hurt yourself Plater. We need you around here.

Nathan
Mar 10 '08 #10
Don't hurt yourself Plater. We need you around here.

Nathan
Hi everybody,

I am trying to retrieve the data from a database fill a dataset and use the dataset and show the data as XML nodes on a web page.

Please get me the code...

Thanks,.....
Mar 10 '08 #11
nateraaaa
663 Expert 512MB
Hi everybody,

I am trying to retrieve the data from a database fill a dataset and use the dataset and show the data as XML nodes on a web page.

Please get me the code...

Thanks,.....
Try this site:
http://aspnet.4guysfromrolla.com/articles/071702-1.aspx
In the future when we make a suggestion for the code you need to implement (for example dataset.WriteXML) please search google for the code.

thanks
Nathan
Mar 10 '08 #12

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

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
2
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in...
3
by: ven | last post by:
Hello i have two tables in my MS SQL named table1 and table2. In each table i have a column PRICE with my own datatype decimal 14;4 allows nulls.... now i wanna select from one table to second...
2
by: ven | last post by:
Hello i have two tables in my MS SQL named table1 and table2. In each table i have a column PRICE with my own datatype decimal 14;4 allows nulls.... now i wanna select from one table to second...
4
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
3
by: mark.irwin | last post by:
Hello all, Have an issue where a redirect pushes data to a page with a select case which then redirects to another page. Problem is the redirect isnt working in 1 case. Code below: strURL =...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
6
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.