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

Display XML file in browser window?

VMI
In my web app, how can I display an XML file in another browser window? Can
this be done with C#?

Thanks.
Nov 17 '05 #1
3 11688
you want to create a popup window and get the child window to open the xml
file.

check out:

http://www.dotnetjohn.com/articles.aspx?articleid=88

HTH

Ollie Riches

"VMI" <vo******@yahoo.com> wrote in message
news:ee**************@TK2MSFTNGP15.phx.gbl...
In my web app, how can I display an XML file in another browser window?
Can this be done with C#?

Thanks.

Nov 17 '05 #2
VMI
thanks . that worked.
The only limitation is that the XML file needs to be somewhere that can be
accessed thorugh http (ie. http://myPC/file.xml). It doesn't seem to work if
I try to open it using the physical directory (ie. c:\ADir\file.xml) . How
come?

Thanks.

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:el**************@TK2MSFTNGP15.phx.gbl...
you want to create a popup window and get the child window to open the xml
file.

check out:

http://www.dotnetjohn.com/articles.aspx?articleid=88

HTH

Ollie Riches

"VMI" <vo******@yahoo.com> wrote in message
news:ee**************@TK2MSFTNGP15.phx.gbl...
In my web app, how can I display an XML file in another browser window?
Can this be done with C#?

Thanks.


Nov 17 '05 #3
okay what you probably want to do then is have aspx page and when the
page_load event fires you need to call Response.Write(<FILENAME>).

some thing like this:

private void Page_Load(object sender, System.EventArgs e)
{
Response.Clear();
Response.ContentType = "text/xml";
Response.WriteFile("c:\\test.xml");
}

Remember not to have any HTML in the aspx page or the browser will not be
able to render the XML.

HTH

Ollie Riches

"VMI" <vo******@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
thanks . that worked.
The only limitation is that the XML file needs to be somewhere that can be
accessed thorugh http (ie. http://myPC/file.xml). It doesn't seem to work
if I try to open it using the physical directory (ie. c:\ADir\file.xml) .
How come?

Thanks.

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:el**************@TK2MSFTNGP15.phx.gbl...
you want to create a popup window and get the child window to open the
xml file.

check out:

http://www.dotnetjohn.com/articles.aspx?articleid=88

HTH

Ollie Riches

"VMI" <vo******@yahoo.com> wrote in message
news:ee**************@TK2MSFTNGP15.phx.gbl...
In my web app, how can I display an XML file in another browser window?
Can this be done with C#?

Thanks.



Nov 17 '05 #4

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

Similar topics

3
by: Hemanth | last post by:
Hello there, I've a utility that runs on a linux machine. Basically, it opens a window, draws a figure and captures the image (screen) and stores it as a jpeg file. The utility requires a...
4
by: Ed | last post by:
I am building a glossary. Each letter of the alphabet has its own HTML page, and each glossary entry on the page already has a unique HTML anchor tag immediately to the left of it. I've already...
3
by: Bob | last post by:
I am pretty new at C#, so bare with me. I want to be able to read a local HTML file and display it in a browser window within my application. I also want to submit that page to my application and...
11
by: Tina | last post by:
I'm in a button clicked event on mainpage.aspx. I want to display a new webpage that has just my image, which is a jpg. I want the page to be a ..jpg not an aspx so that it will be easy for the...
1
by: Isabella | last post by:
I have successfully insert .wmv files into MySQL. When I display the video in the browser using Read.aspx to get the .wmv: Response.ContentType = objDataReader.Item("swingContentType")...
1
by: chazmanian | last post by:
We have a situation where we display PDF files through IE via a method in our code-behind as follows protected void displayPDF(string exePath, string filePath { // exePath is the...
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
2
by: David Cho | last post by:
I hope I can describe the dilemma precisely. I have code to render PDF output in a browser window (using a third party control that merges PDF files and renders the PDF output in the browser...
14
by: rolfejr | last post by:
I am trying to display a PDF in the users browser that is pulled from a binary field in our database, and keep that PDF from caching on the client computer. I can successfully pull the PDF and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.