|
-
February 21st, 2000, 07:30 AM
#1
ASP - Passing Large Amounts Of Text From One Page To Another
Sorry if this is a little off-topic.
Is there another way to do as the subject says other than using the command line (Request.QueryString() in VBScript)? If you want to pass a lot of text it results in a ridiculously long URL.
-
February 21st, 2000, 07:48 AM
#2
Re: ASP - Passing Large Amounts Of Text From One Page To Another
you can use the POST method instead of GET.
this will not affect the address field.
You can access the valuues in your ASP via the REQUEST object. use the Form object instead of the QueryString object.
Also, to pass large amounts of data between pages consider using Session variables.
-
February 21st, 2000, 08:45 AM
#3
Re: ASP - Passing Large Amounts Of Text From One Page To Another
So Request.Form() can access forms on the page which sent us to the current page, then? Even though that previous page appears to have been destroyed now that we are on a new page?
Could you tell me how to use session variables, please? An example would be great.
Thanks.
-
February 21st, 2000, 09:00 AM
#4
Re: ASP - Passing Large Amounts Of Text From One Page To Another
>So Request.Form() can access forms on the page which sent us to the current page, then? Even though that previous page appears to have been destroyed now that we are on a new page?
not exactly sure what you mean.
Request.Form allows you to access form variables passed to your asp.
let's say you are on page first.htm
with
<form name=... method=post action="yourasp.asp">
<input type=text name="test" value="...">
</form>
in yourasp.asp you can access the value of field "test" via:
request.form("test")
or - if you are as lazy as I am - via
request("test")
>Could you tell me how to use session variables, please? An example would be great.
It's just to easy:
in yourasp1.asp
Session("mySessionVarName") = hugeString ' ...or array
in yourasp2.asp
mystring =Session("mySessionVarName")
Session vars are per user, Application vars per application.
-
February 21st, 2000, 09:11 AM
#5
Re: ASP - Passing Large Amounts Of Text From One Page To Another
>not exactly sure what you mean.
>Request.Form allows you to access form variables passed to your asp.
Sorry, my mistake - I was getting a little confused there. I forgot that GET gives QueryString(), POST gives Form().
>It's just to easy:
>Session("mySessionVarName") = hugeString ' ...or array
>Session vars are per user, Application vars per application.
Perfect, thankyou.
-
February 21st, 2000, 02:44 PM
#6
Re: ASP - Passing Large Amounts Of Text From One Page To Another
Just a word of caution with session variables - they require that the browser have cookies turned on. i haven't had any problems with this, but apparently some people have, since there are quite a few articles about how to get around this. the server stores the user's SessionID in a cookie, so if the user isn't using cookies, the Session_OnStart event is fired every time they hit the page since the server can't read the sessionid from the cookie it tried to write.
just a FYI.
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|