Thanks for replying. I'll not be uploading anything back to server on next
visit, I'll just read the file, extract the XML and then use the xml to form
my query.
But my question remain unanswered - How do I save the text that I form at
runtime into a file on the client machine? Currently I use this:
xmlDoc = Session["XmlDocument"] as XmlDocument;
string fileName = "query.xml";
Response.Clear();
Response.AppendHeader("content-disposition", "attachment; filename=" +
fileName);
Response.ContentType = "text/xml";
Response.Write(xmlDoc.OuterXml);
Response.Flush();
But this saves the XML as well as the source from the current aspx page. How
do I save just the XML and/or get rid of all other source from the file.
Nikhil
"Martin Dechev" <de******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi, Nikhil Tayal,
If the info is not that large you can save it as a cookie on the client.
If it is really large you can prompt the user to save it and on the next
visit to upload it. This is very bad design regarding the security though,
because the users can upload practically anything.
A standard solution is to keep this data in the server in the profile of
the user (supposing that you keep the profiles of your users and they (may)
authenticate before the visit to the page).
Greetings
Martin
"Nikhil Tayal" <a-******@microsoft.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl... Is there a way to write a file on the client machine from an aspx page?
I've a custom query page and need to store the search criteria specified in
an XML file on the user machine from my web page (aspx). I form the XML at
run time from the search fileds specfied by the user and now my aspx page
should save it on client machine so that the user can open the same query on
next visit of the page.
And help is appreciated.
Nikhil