asp_databases thread: Using value of a variable in another asp page
Message #1 by "Khalid Qureshi" <khalidone@y...> on Wed, 1 Jan 2003 14:43:50
|
|
I have created two asp pages. I have declared a variable in one asp page
and I want to use the value this variable to another asp page. Is it
possible? If possible please tell me how?
Message #2 by Mark Eckeard <meckeard2000@y...> on Wed, 1 Jan 2003 07:20:07 -0800 (PST)
|
|
You could store the value in a session variable, a
cookie or in a database.
Mark.
--- Khalid Qureshi <khalidone@y...> wrote:
> I have created two asp pages. I have declared a
> variable in one asp page
> and I want to use the value this variable to another
> asp page. Is it
> possible? If possible please tell me how?
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Message #3 by "Kalwinder" <kdohil@t...> on Fri, 10 Jan 2003 17:22:55
|
|
Or you can pass the variable to the next page by using the following:
to pass a logID of 1 to another page do:
href="default.asp?logID=1"
To retrieve this from the next page:
request("logID"), which will obviously = 1
Hope this helps
> I have created two asp pages. I have declared a variable in one asp page
a> nd I want to use the value this variable to another asp page. Is it
p> ossible? If possible please tell me how?
Message #4 by "Ron Williams" <ronwilliams32@c...> on Sat, 11 Jan 2003 02:03:47
|
|
OR you can use a hidden text field
yourVariable = 1
<form action="ASPPageNumber2.asp">
<input type=hidden name=AnyName value=<%=yourVariable%>>
<input type=submit value=submit>
</form>
then on page number 2 after user clicks submit
anotherVariable = request.form("AnyName")
many possibilities for you.
ron
> I have created two asp pages. I have declared a variable in one asp page
a> nd I want to use the value this variable to another asp page. Is it
p> ossible? If possible please tell me how?
Message #5 by "Andrew Mesplay" <amesplay@g...> on Sat, 11 Jan 2003 09:27:11
|
|
> OR you can use a hidden text field
> yourVariable = 1
> <form action="ASPPageNumber2.asp">
<> input type=hidden name=AnyName value=<%=yourVariable%>>
<> input type=submit value=submit>
<> /form>
> then on page number 2 after user clicks submit
> anotherVariable = request.form("AnyName")
> many possibilities for you.
> ron
>
> > I have created two asp pages. I have declared a variable in one asp
page
a> > nd I want to use the value this variable to another asp page. Is it
p> > ossible? If possible please tell me how?
Message #6 by "Andrew Mesplay" <amesplay@g...> on Sat, 11 Jan 2003 09:31:57
|
|
Sorry, I screwed up my last post.
You can use a global.asa file. That will make all the variables specified
accessable by all asp pages in the application. Or you could use a simple
<FORM> Using the POST method and get them from the Request object
(Request.Form("SOmething")
|