- ASP .Net
||07-13-2010 01:48 PM
ASP.NET form action file - writing to text file
<form id="my_form" action="">
<input type="text" id="file_name" rows="1" cols="20">
var d = seatsArray.join();
var url = "mysite/savetext.asp?seatsArray="+d + "&file_name=" +
document.getElementById("my_form").action = url;
document.getElementById("my_form").method = "POST";
And I'm not sure about how I can make an action file in ASP.NET for this form so that it will write the contents of this array (a separate line for each value) into a text file. It also needs to create the text file and name it what the user put in the "file_name" text box. I tried something briefly but it is incomplete:
Dim objFSO, objTStream
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("THIS NEEDS TO BE WHAT THE USER ENTERED IN 'FILE_NAME'", True)
objTStream.WriteLine("THIS NEEDS TO BE THE ARRAY")
Set objTStream = nothing
Set objFSO = nothing
Can you help me out with how to make this work?
|All times are GMT. The time now is 10:43 AM.
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.