vb2java
10-21-2011, 07:14 PM
Hello again,
Ok, clearly I was clueless (I am referring to my "SOMETHING" post). I am not quite as lost although I have no idea WHY the following Classic ASP script will not simply write the value of <input type="text" value="firstname" /> to a text file. Take this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TextBox Process Test</title>
</head>
<body>
</br>
<form action="FirstNameTest.asp" method="Post">
First Name: <input type="text" name="firstname" />
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />
</body>
</html>
That is called FirstNamePage.asp. The following is FirstNameTest.asp:
THIS PART WORKS
<%
Option Explicit
Dim firstname
firstname = Request.Form("firstname")
response.write firstname
' If I add the following lines, the response.write still works:
Dim fso, txtfile, objFile
textfile = "C:\Inetpub\wwwroot\FolderName\FirstName.txt"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
' AS SOON AS I TRY TO OPEN THE TEXTFILE, I GET ERROR HTTP 500
Set objFile = fso.OpenTextFile(txtfile, 8, True)
objFile.WriteLine firstname
objFile.Close
Set objFile = nothing
Set fso = nothing
%>
Will someone PLEASE help me... pretty please :confused:
Ok, clearly I was clueless (I am referring to my "SOMETHING" post). I am not quite as lost although I have no idea WHY the following Classic ASP script will not simply write the value of <input type="text" value="firstname" /> to a text file. Take this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TextBox Process Test</title>
</head>
<body>
</br>
<form action="FirstNameTest.asp" method="Post">
First Name: <input type="text" name="firstname" />
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />
</body>
</html>
That is called FirstNamePage.asp. The following is FirstNameTest.asp:
THIS PART WORKS
<%
Option Explicit
Dim firstname
firstname = Request.Form("firstname")
response.write firstname
' If I add the following lines, the response.write still works:
Dim fso, txtfile, objFile
textfile = "C:\Inetpub\wwwroot\FolderName\FirstName.txt"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
' AS SOON AS I TRY TO OPEN THE TEXTFILE, I GET ERROR HTTP 500
Set objFile = fso.OpenTextFile(txtfile, 8, True)
objFile.WriteLine firstname
objFile.Close
Set objFile = nothing
Set fso = nothing
%>
Will someone PLEASE help me... pretty please :confused: