Home All Groups Group Topic Archive Search About

what is the problem with my ASP Code



Author
7 Mar 2005 12:20 PM
Paramjeet Singh
I was writing data to an html file through the following cide written a
file called "append.asp"

<%
Set MyFileSystemObject =
Server.CreateObject("Scripting.FileSystemObject")
Set MyTextFile =
MyFileSystemObject.OpenTextFile(Server.MapPath("clientlist.htm"), 8,
TRUE)
MyTextFile.WriteLine("<p>")
MyTextFile.WriteLine("<strong>")
MyTextFile.WriteLine("<LI>")
MyTextFile.WriteLine(Request.form("company"))
MyTextFile.WriteLine("<br>")
MyTextFile.WriteLine("</strong>")
MyTextFile.WriteLine(Request.form("person"))
MyTextFile.WriteLine("<br>")
MyTextFile.WriteLine(Request.form("address"))
MyTextFile.WriteLine("<br>")
MyTextFile.WriteLine("Ph. ")
MyTextFile.WriteLine(Request.form("phone"))
MyTextFile.WriteLine("</p>")
MyTextFile.WriteLine("<center>")
MyTextFile.WriteLine("<font size=2>")
MyTextFile.WriteLine("<a href=#top>")
MyTextFile.WriteLine("Top of Page")
MyTextFile.WriteLine("</a>")
MyTextFile.WriteLine("</font>")
MyTextFile.WriteLine("</center>")
MyTextFile.Close
response.redirect("confirm.htm")
%>

Now the same code is not working. What reason is behind that. If there
is any coding problem please do let me know as I am not that much
familiar in debugging ASP.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Author
7 Mar 2005 12:36 PM
Bob Barrows [MVP]
Paramjeet Singh wrote:
> I was writing data to an html file through the following cide written
> a file called "append.asp"
>
> <%
> Set MyFileSystemObject =
> Server.CreateObject("Scripting.FileSystemObject")
>
> Now the same code is not working.

Please try to describe your symptoms without using the words "not working",
"fails", etc. Are you getting errors? Incorrect behavior?

> What reason is behind that. If there
> is any coding problem please do let me know as I am not that much
> familiar in debugging ASP.
>

Obviously, something has changed on the server. My guess:
http://www.aspfaq.com/show.asp?id=2180

If this is not relevant, then provide more information about your symptoms.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Author
7 Mar 2005 12:52 PM
Evertjan.
Paramjeet Singh wrote on 07 mrt 2005 in
microsoft.public.inetserver.asp.general:

> I was writing data to an html file through the following cide written a
> file called "append.asp"
>
> <%
> Set MyFileSystemObject=Server.CreateObject("Scripting.FileSystemObject")
> Set MyTextFile=MyFileSystemObject.OpenTextFile(Server.MapPath
("clientlist.htm"), 8, TRUE)
>

I suspect the write permission on "clientlist.htm" is not set.

> Now the same code is not working.

Describe "not working" please.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

AddThis Social Bookmark Button