473,396 Members | 1,865 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,396 software developers and data experts.

Showing raw xml from memory in an asp.net page

Hi.

I'd like to create an xml document on the fly and then display it in an
asp.net page. I can use an iframe and point to a URL (which displays
perfectly), but I'd not like to save the xml to a file (it will be built as
I go along).

I can use the <asp:xml> control, but I don't want to have to write the XSLT,
I love the one I get for free within IFrame.

Any suggestions?

Thanks.
Nov 12 '05 #1
1 7853
Figured out the answer to my own question. I thought I'd post it in case
anyone is interested...

1) Create a page with an IFrame on it. Set the src to a second page
2) On the second aspx page, remove all the html except the Page directive
(do remove the !doctype etc.)
3) In thepage load of the second page create a memory stream and an
XMLSerializer
4. Serialize your object to the memory stream. Then use ToArray() on the
memory stream to write the
serialized document to a byte array. Then use Encoding.ASCII.GetString to
write the byte array to a string, finally, use Response.Write to write the
string. This will be displayed in the IFrame on the first page.

Works great.
"Jesse Liberty" <jl******@libertyassociates.com> wrote in message
news:ue********************@speakeasy.net...
Hi.

I'd like to create an xml document on the fly and then display it in an
asp.net page. I can use an iframe and point to a URL (which displays
perfectly), but I'd not like to save the xml to a file (it will be built as I go along).

I can use the <asp:xml> control, but I don't want to have to write the XSLT, I love the one I get for free within IFrame.

Any suggestions?

Thanks.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid,...
3
by: Dirk Goossens | last post by:
Hi! I stored the file name and path of photos in a table with data from students and teachers. Is there a way to show the photos in a report or form? Thanks! Dirk Goossens Vrij Instituut...
3
by: Darksun4 | last post by:
Hi all, I am making an emulator and I want to show all its memory contents. But i don't want to say : memory address 1 : xxxx memory address 2 : xxxx but something like that : memory...
3
by: Brian Henry | last post by:
Is there anyway to prevent the white box that drops down when you do a combobox dropdown from showing? I am trying to make a custom combobox which requires showing a custom form in its place, but...
3
by: R.A. | last post by:
Hi I have the web pages developed using c#. When I change the http to https the lock showing the secure site is not showing. Is there more beside changing the http to https to convert the web...
4
by: Larry R | last post by:
I am trying to set a panel (that holds a progress image) to be visible when a long running process is happening. Sounds simple, right :) What happens is the panel never becomes visible. The load...
4
by: Blasting Cap | last post by:
I have some code where I populate some items in a listbox. The code is: ListBoxDomesticExport.Items.Insert(0, "Domestic (Commercial)") ListBoxDomesticExport.Items(0).Value = "0" ...
2
by: rawatgaurav81 | last post by:
HI all, I had come across this big problem,I am in the process of converting a desktop C++ application into a C# asp.net application.In the desktop version I run some analysis and get some...
5
by: Andy B | last post by:
I have 2 TextBoxes and an Add button on a page. When the user fills in the TextBoxes, the values are added to a dataset table. When the page gets done reloading, the TextBoxes are turned into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.