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.


0
jliberty (5)
8/20/2004 6:20:49 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
634 Views

Similar Articles

[PageSpeed] 32

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" <jliberty@libertyassociates.com> wrote in message
news:ueydnZLdsv-c3LvcRVn-sw@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.
>
>


0
jliberty (5)
8/22/2004 2:15:13 AM
Reply:

Similar Artilces:

Outlook shows offline during dial up
Having a problem with outlook 2002. Over the WAN everything works fine. Dial up and connect to the network (VPN) internet work fine. Outlook will sync up however, a red x shows up in the bottom right hand corner. Outlook shows offline, I can send and receive but must hit send and receive. I have reloaded the computer from scratch and still have the same problem. Could it be a Excange setting? Any Ideas? Thanks for the help, If you hit File | Connect to Exchange Server what happens? -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP http://home.hawaii.rr.com/schorr **I apologize ...

NET DISPLAY CUSTOMIZING
Our default NET DISPLAY is very difficult to see during the day - can anyone tell me an easy way to customize the colors and the font sizes? ...

analytical accounting lookups should only show valid codes
When entering AA transaction distributions, the code lookup window should only show valid code combinations. It's not intuitive for the user to have to select a code and get an error message to discover which codes are valid. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the mess...

GetObjectData not firing using XML Serialization
What attributes/code do I need to add to a class to get GetObjectData to fire? I need to use XML serialization to serialize an object with private members including complex data structures which eventually may contain other private objects. I can get that method to fire using SOAP serialization, but shouldn't I be able to customize my serialization process using XML serialization? Thanks, Todd. ...

loading XML into a dataset
I'm currently reading data from an XML file using XPathNavigator and XPathNodeIterator to select the subset of data that I want. I've never using the XPath objects before so I'm not sure how to get this data into a dataset. XPathDocument doc = new XPathDocument(@"C:\inetpub\wwwroot\test\test.xml"); XPathNavigator nav = doc.CreateNavigator(); XPathNodeIterator iter = nav.Select("/test/translation/engword[preceding-sibling::fraword = '" + strFraWord + "']"); Can anybody help me out with this? Any assistance would be re...

Information Stores show dismounted yet mail is still flowing...
Background: Windows AD Mixed moded. Exchange 2003 installed on to a 2 node Microsoft cluster. 1 Front End server...connecting to the primary cluster node. Windows 2003 Standard on, FE Windows 2003 Enterprise Server on BEs (<---cluster) no service packs on either. Exchange has SP1 installed on both nodes and the FE. There are still Exchange 5.5 servers in the environment although they are not being used. The Issue: .....the information stores and public folders all show that they are dismounted...yet email is still flowing into and out of the server without any issues. I just...

DHMTL or ASP.Net
Hi there, I'm reading for my CRM Installation certification, but i've ran into a problem: In the chapter about the presentation layer, it is stated, that the Sales for Outlook Client uses ASP.Net for rendering webpages. However - in the check-questions at the end of the chapter, DHTML is outlined as the correct answer. Does anyone know which is true? -- Best Regards Morten Hi Morten, The answer is actually both. ASP.NET is the server side system that renders all of the pages that open when you use MS-CRM. DHTML is a client side add-on that, for instance, allows you to see t...

Show a blank result in a cell when there is no value in the "Lookup" cell
I apologize if this question has been asked, but I have been unable to find an answer searching the topics. I'm using the following formula in cell C3: =INDEX(LastName,MATCH(A3,EmpID,0)) When I type in an employee ID in A3, his/her last name shows in C3. However, when there is no value in A3, C3 shows error "#N/A". Is there a way to show a blank cell in C3 until a value is entered into A3? Thanks in advance! Mike On Aug 5, 10:45 am, "Michael Slater" <mslater...@comcast.net> wrote: > I'm using the following formula in cell C3: > =INDEX(LastNam...

Show Window
I am currently developing a MFC SDI application. I want to integrate a tray icon with it. When the application is minimized it hides by ShowWindow(SW_HIDE) and then when double clicked on tray icon shown by ShowWindow(SW_SHOWNORMAL). But the problem is if some other application is activated after my application is minimized, ShowWindow shows it but it's behind some screen. I have tried with SetFocus didn't work. Please help me to solve this problem. Thank you. Varuna Try BringWindowToTop. ---- Ajay Kalra ajaykalra@yahoo.com In addition to Ajay's idea you can also use SetFor...

getting more columns and data onto one page in Crystal
Hello: Since you can only place so much data onto a "piece of paper", likely the answer is "no". But, even after choosing "Landscape" in Crytal (10.0), there's not a way of getting as many columns of data onto a report as I want--is there? Ideally, I'd like to get 14 columns on there but am running out of room on the right. Also, I have placed a cross-tab on my report that prints on multiple pages instead of just one. Of course, since the cross-tab has 83 rows of data, my guess is that there is nothing that I can do about this either. Is there? ...

reminder still shows up
when I run Outlook.exe /cleanreminders it simply opens Outlook, I am running Vista "Toppro" <Toppro@discussions.microsoft.com> wrote in message news:7AE8DBF7-6BE3-454A-82F9-5A040566026C@microsoft.com... > when I run Outlook.exe /cleanreminders it simply opens Outlook, I am > running > Vista Outlook version? The Windows version isn't as important and that of Outlook. -- Brian Tillman [MVP-Outlook] ...

Trouble Reading XML string
I have a method that generates an string in XML format and passes it to be processed. The string is in the following format: <grandparent> <parent> <child1>text</child1> <child2>text again</child2> </parent> <aunt> <cousin1>text</cousin1> <cousin2>text2</cousin2> <cousin3>text4</cousin3> </aunt> </grandparent> string xmlInput = <values above> XPathDocument xpDoc = new XPathDocument(new StringReader(xmlInput)); XPathNavigator xpNav = xpD...

Results show as a minus. WHY?
I have an application that was developed by another developer using VB.net which reside in a SQL table. I need to use some of the data from this table, however the data shows as -0.5 or - 0.99 or -1.70 etc in my Access tables. How can I get those numbers to show as a percentage with only one decimal point to the left? Example: 3.6% or 31.4 %. Any help would be greatly appreciated. No matter what I do it shows that dang "-" at the beginning. You can use the Abs function to strip off the negative Abs([YourTable].[YourField]) And you can format that as percentage either using th...

Using ajax call to fetch multiple results from multiple queries and showing them 1 by 1 as the results comes.
Hello, I've 20 labels in a 2x10 table on a page. for each label, data comes by individual queries. (total 20 queries for the page.) and it takes about 30-40 seconds for the page to load, and it's not comfortable for the user to see blank page. I want that each cell will show loading.gif images. As and when data comes from query, the images should go visible=false, and the label should display the values one by one. How do I do this task using ajax? Some ASP.NET code example will be helpful for me, as I'm a kind of beginner. Thanks ...

FBA and modifying the logon.asp
We've enabled FBA on all of our OWA servers with no issues. I've also customized the logon.asp page to match the look of the rest of our Intranet. However, our CEO does not want users to have to enter domain when they use OWA (we only have one user domain). I know this cannot be done via the ESM with FBA and all of the documentation says you must modify the logon.asp page to include the domain automatically. Does anyone know how to do this? Basically I want to append "domain/" to the front of user name when it's submitted. I need this to be invisible t...

"Page #" footer doesn't display the # on Page 1. It only displays "Page"?
"Page #" footer doesn't display the # on Page 1. It only displays "Page"? It works on fine on the following pages, just not the first. Driving me nuts. Does anyone know what I'm dong wrong? Thanks in advance, John. EggHeadCafe - Software Developer Portal of Choice SQL Performance Tuning http://www.eggheadcafe.com/tutorials/aspnet/8cc771eb-44bc-4808-8ad2-ea33508a48f1/sql-performance-tuning.aspx Is the text box wide enough? -- Don - Publisher 2000� Vancouver, USA <John Gilmore> wrote in message news:2009117113243iam10001@yahoo.com... > > "...

show comments when cell is highlighted Vs when cursor runs over? #2
How do you make the comments appear when the cell is highlighted opposed to when the mouse cursor runs over the cell? You can press Shift/F2, or Insert/Edit Comment. If you wanted to see it "automatically", when you select the cell, you'd need a macro, but I don't think this is what you're asking. Bob Umlas Excel MVP "Don" wrote: > How do you make the comments appear when the cell is highlighted opposed to > when the mouse cursor runs over the cell? To at least Excel 2000, if you have the Tools, Options, Comment Indicator Only you will see the co...

page layout
i need the toolbar to stay & the page to be below it And what are you getting instead? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "billy" <billy@discussions.microsoft.com> wrote in message news:67422DF4-6B5A-49C6-836C-9E6B466EE3ED@microsoft.com... >i need the toolbar to stay & the page to be below it > ...

how to show numbers that begin with 0 in excel
I need to type numbers into an excel spreadsheet some of them begin with a zero some do not. How can I have excel show the 0 in the numbers that begin with 0. If I type 0236547 the number shows as 236547. I don't want all the numbers I type to begin with zero. I am using Excel 2003. Thanks very much for your help. Best regards, Dee use a custom format with how ever many digits you need, 000000 -- Gary Keramidas Excel 2003 "Dee" <Dee@discussions.microsoft.com> wrote in message news:EA60FC8A-C7CB-432A-B2B2-EEEBF86D2646@microsoft.com... >...

how to query a dataset with xml tables inside.
This is a multi-part message in MIME format. ------=_NextPart_000_0030_01C3DB37.4468A9E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have two xml docs, authors & articles. Both have authorID as a common = node <?xml version=3D"1.0" encoding=3D"utf-8"?> <!--This is a comment--> <Authors> <Author> <AuthorID>0</AuthorID> <Name>Mark</Name> <Login>mark</Login> <Pwd>markpwd</Pwd> </Author> <Author> <AuthorI...

Report Server shows 'Service Unavailable'
Hi, before install, the SRS setup, send me a warning, some like "the Windows Sharepoint Services are install and not permit initialize a Reportserver component" i skip wiht the installation, so.. I can't run http://<localhost>/Reports and http://<localhost>ReportServer show a message "Service Unavailabe", but the ReportServer service is running How initialize that or what do i do? ------=_NextPart_0001_09E699C9 Content-Type: text/plain Content-Transfer-Encoding: 7bit <Miguel@discussions.microsoft.com> wrote: > before install, the SRS set...

Comments not showing
When a SharePoint workflow is edited and a comment is added. The comment does not display in the workflow status screen under workflow history. It shows as follows: Task assigned to Andre Wessels was completed by System Account. Comments: Instead of: Task assigned to Andre Wessels was completed by System Account. Comments: Please update to the new company logo. This happens for all standard SharePoint workflows (Approval, Collect Feedback). Any custom workflows does show the comment. The comment field is update in the task item. It just does not show. There is no error in t...

Show more time in weekly view?
Outlook 2007 On default the weekly view is only showing until 4 PM without scrolling down. I know there is a way to let you see into the evening hours also without scrolling. Help please. Thanks... Bob ...

vb.net 2008 professional version question
I am basically new to vb.net 2008 working with the professional version. I have a solution to work with that has lots of projects in it with no documentation. I need to determine how this solution works. I know I would look in the properties to see what the startup project is. However after that, I was wondering if you have any suggestions on how to determine how this application works in addition to stepping through code. Can you tell me how I should go about determing how this application works. ...

Clear Data>Security Resource Description table not showing in list
GPv10 Logged in as sa. Go to Maint. >Clear Data>System and in the Tables list the Security Resource Description table is not there. Is there something I need to do to get access to that table? Thanks. Gi Never mind....I figured it out. You have to change the Display to Physical....Duh!! ...