T
Thomas Satzinger
Hi to all.
I am using the follwonmg code to download from an internal XmlDocument to
the client file system:
XmlDocument _doc ; // has some contents
_doc.PreserveWhitespace = true;
byte[] _bArr;
System.Text.UnicodeEncoding uniEncoding = new System.Text.UnicodeEncoding();
String _sXml = _doc.OuterXml;
_bArr = uniEncoding.GetBytes(_sXml);
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("ContentType","application/octet-stream");
Response.AddHeader("Content-Disposition", "attachment;
filename=filter.flt");
Response.BinaryWrite( _bArr );
Response.End();
It works pretty wee as far as i have ssen.
Only one thing i do not know how to solve
The file-save dialog shows a file type HTML document.
When i save it, i get a filter.flt.htm document.
How can i convince my app to save a filter.flt document per default.
Thanks
Thomas
I am using the follwonmg code to download from an internal XmlDocument to
the client file system:
XmlDocument _doc ; // has some contents
_doc.PreserveWhitespace = true;
byte[] _bArr;
System.Text.UnicodeEncoding uniEncoding = new System.Text.UnicodeEncoding();
String _sXml = _doc.OuterXml;
_bArr = uniEncoding.GetBytes(_sXml);
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("ContentType","application/octet-stream");
Response.AddHeader("Content-Disposition", "attachment;
filename=filter.flt");
Response.BinaryWrite( _bArr );
Response.End();
It works pretty wee as far as i have ssen.
Only one thing i do not know how to solve
The file-save dialog shows a file type HTML document.
When i save it, i get a filter.flt.htm document.
How can i convince my app to save a filter.flt document per default.
Thanks
Thomas