Jump to content

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


Guest Osman Muslu

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...