Article View: dk.edb.internet.webdesign.asp
Article #59Asp f.readline Question
From: Yoka
Date: Tue, 06 Apr 2004 15:51
Date: Tue, 06 Apr 2004 15:51
112 lines
4739 bytes
4739 bytes
Hi, folks...Im new in the asp community, so this may be some silly
questions :)
I am trying to make a "Tagfinder" (Tag=gamername) So that people can
write their tags upload them and search for others. In the first page
they write their tags in some forms:
__________________________________________________________________________
<form method="post" action="tagfindersikker.asp" id="id31">
Insend dine egne oplysninger.
<table id="id31" border="0"><tr><td>
XBCtag:</td><td>
<input type="text" name="xbcform"></td></tr>
<tr><td>XBLtag:</td><td>
<input type="text" name="xblform"></td></tr><tr><td>
Forumprofile:</td><td>
<input type="text" name="forumform"></td></tr><tr><td>
<input type="submit" value="send" target="3"></tr></td></table>
</div>
</form>
____________________________________________________________________________
in the second page they are asked if the written tags is correct, here
the page gets the tag information from the previous page through a
"Request.Form"
page:
_________________________________________________________________________
<%
If Request.Form("xbcform") = "" And Request.Form("xblform") = "" And
Request.Form("forumform") = "" Then
Response.Write("You have to write at least one tag! <br><br><b><a
href='Tagfinder.asp'>back</a><b>")
Else
Response.Write("<h2> Is this the right informations?<h2>")
Response.Write "Your xbCtag er " & Request.Form ("xbcform") &"<br>"
Response.Write "Your xbLtag er " & Request.Form ("xblform") &"<br>"
Response.Write "Your forumprofile is " & Request.Form ("forumform")
&"<br><br>"
Response.Write "Are you sure that this i right?<br><br><br>"
Response.Write "<a href='tagfinder.asp'>No</a>"
Response.Write "<a href='modtagtagfinder.asp'>Yes</a>"
End If
Response.cookies("tag")("xbcform") = Request.Form ("xbcform")
Response.cookies("tag")("xblform") = Request.Form ("xblform")
Response.cookies("tag")("forumform") = Request.Form ("forumform")
Response.cookies("tag").Expires = date+1
%>
____________________________________________________________________________
As you can se, i store the form informations in a cookie...That's
because i dont know how i can get the form informations in the next
page in other ways?!?!
Please tell me if there is an other way, to get them!!
This is the next page, where i store the informations in a text file
(And retrieves the cookie form info's:
____________________________________________________________________________
Response.Write "Your xbCtag is: " & Request.cookies("tag")("xbcform")&
"<br>"
Response.Write "Your xbLtag is: " & Request.cookies("tag")("xblform")
&"<br>"
Response.Write "Your forumprofile is: er " &
Request.cookies("tag")("forumform")&"<br><br>"
Response.Write "This informations has been stored.<br><br>"
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("/asp/brugere.txt")
Set f = fso.OpenTextFile(filespec,1)
Response.Write(f.Read())
Set f = fso.OpenTextFile(filespec,8)
f.WriteLine " xbCtag= "& Request.cookies("tag")("xbcform") & "<br>"
f.WriteLine " xbLtag= "& Request.cookies("tag")("xblform") & "<br>"
f.WriteLine " forumProfil= "& Request.cookies("tag")("forumform") &
"<br>"
Response.Write "<a href='andretaggers.asp'>Search after tags.</a>"
%>
_________________________________________________________________________
Here, i dont know how to read the LAST line in the text file that has
been opened:
_______________________________________________________________________
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("/asp/brugere.txt")
Set f = fso.OpenTextFile(filespec,1)
Response.Write f.readline
_______________________________________________________________________
Will you please tell me how you can read THE LAST line in the text?
Thank you
Technical Details
Message-ID:
<643692e0.0404060751.5f81cf98@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff435,bfac55920e3cb0b2,start X-Google-Attributes: gidff435,public X-Google-ArrivalTime: 2004-04-06 08:51:29 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: ao88nu@yahoo.dk (Yoka) Newsgroups: dk.edb.internet.webdesign.asp Subject: Asp f.readline Question Date: 6 Apr 2004 08:51:28 -0700 Organization: http://groups.google.com Lines: 112 Message-ID: <643692e0.0404060751.5f81cf98@posting.google.com> NNTP-Posting-Host: 129.142.34.131 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1081266689 25668 127.0.0.1 (6 Apr 2004 15:51:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 6 Apr 2004 15:51:29 +0000 (UTC)