Ask a Question related to ASP.NET General, Design and Development.
-
Emmanuel Kahn #1
how to downloas xml file
Hi Sreejumon and thanks
I would like to download xml and the user must select the path of the
downloaded file
the user will select where the file will be saved !!!
two problems:
1)I know that I can create a XML file on my server using writexml method
of the dataset.
To download the file I use simple HREF or asp hyperlink
for .doc file for instance it will automatically open a dialog box
asking the user open/save and where to save this file.
for xml the browser automatically open the file. when I want to save it
only and not to open it.
2) with rendercontrol how can the user select the path ?
thanks
Manu
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Emmanuel Kahn Guest
-
problem in binding xml file data to datagrid xml file isgenerated through JSP file
problem it that i am creating xml file using JSP file and i want to bind DataGrid with xml file data that is created using JSP but it will not Bind... -
File Viewer / Bloated file sizes / What is the best file format?
I would like to find a viewer capable of looking at the main Adobe formats as well as the standard formats such as JPG and WMF ... but yet the only... -
Open file, make changes, save file, close, re-open, file contents not changed
I've now run into this several times and it's completely destroyed all of my confidence in Ilustrator CS on Mac. I'm hoping someone can confirm that... -
[BUG] File#rewind, File#syswrite, File#pos on Cygwin build
On the cygwin build of ruby v1.8.0, I have encountered a strange bug when using rewind, syswrite and pos. If you open a file in read/write mode,... -
Confused about locking a file via file.flock(File::LOCK_EX)
I am writing a ruby appl under AIX where I need to update the /etc/hosts table. I would like to make sure that during my update nobody else can... -
Ken Cox [Microsoft MVP] #2
Re: how to downloas xml file
Hi Emmanuel,
The code below gets a dataset and pushes it out as a file for download. Does it
do what you need?
Ken
MVP [ASP.NET]
Imports System.io
Public Class writexmlp
Inherits System.Web.UI.Page
Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim ds As New DataSet
ds.ReadXml(Server.MapPath("a.xml"))
Dim xmlstream As New MemoryStream
ds.WriteXml(xmlstream)
Response.AppendHeader _
("Content-disposition", _
"attachment; filename=a.xml")
Response.ContentType = "application/download"
Response.BinaryWrite(xmlstream.ToArray())
Response.End()
End Sub
End Class
"Emmanuel Kahn" <ecy@bezeqint.net> wrote in message
news:%23FxH85KTDHA.3636@tk2msftngp13.phx.gbl...
Hi Sreejumon and thanks
I would like to download xml and the user must select the path of the
downloaded file
the user will select where the file will be saved !!!
two problems:
1)I know that I can create a XML file on my server using writexml method
of the dataset.
To download the file I use simple HREF or asp hyperlink
for .doc file for instance it will automatically open a dialog box
asking the user open/save and where to save this file.
for xml the browser automatically open the file. when I want to save it
only and not to open it.
2) with rendercontrol how can the user select the path ?
thanks
Manu
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Ken Cox [Microsoft MVP] Guest



Reply With Quote

