Jump to content

Saving a Textbox as an xml or txt file on server ASP help


Guest Osman Muslu
 Share

Recommended Posts

Guest Osman Muslu

Hey guys,Actually i work with flash but i need to get some help from server side scripters.I will greatly thank you who tries to help.I need a blank ASP page with a textbox and a submit button.The user writes whatever he wants to the textbox and when he presses submit the asp page should save it as a xml or .txt file to the same directory where page is.Doesnt matter for me but if one of them is easier on the scripting choose that one.Can you help me with the coding please?I discovered

<%text="<note>"text=text & "<to>Tove</to>"text=text & "<from>Jani</from>"text=text & "<heading>Reminder</heading>"text=text & "<body>Don't forget me this weekend!</body>"text=text & "</note>"set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.loadXML(text)xmlDoc.Save("test.xml")%>
this saves xml to the server but i want it to save the content of the textbox when button is pressedThank you for your interest.Respect
Link to comment
Share on other sites

To open any file you can use the FileSystem object:http://www.w3schools.com/asp/asp_ref_filesystem.aspIt will be better to use that instead of the XMLDom object if you just want to save it to a file. If you have a form with a method of post, then you can find the submitted values in the Request.Form collection:http://www.w3schools.com/asp/asp_inputforms.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...