|
 |
access_asp thread: passing data between pages
Message #1 by "Jerry Brown" <jbrown@b...> on Fri, 21 Feb 2003 16:06:19
|
|
HI,
I am new, and i have seen other questions similar to the one i want to
ask, but i'm still not getting it. I want to pass the value of one field
to a field on a different page.
Example:
If Directory Code on the page is 12345, i want to open another page, in
add mode, and have the directory code fields value on the new page be
12345. I have been playing with Post and Get, but it ain't happening for
me. Can someone please point me in the right direction.
Thanks in advance!
JB
Message #2 by "Young, Ashley" <Ashley.Young@c...> on Fri, 21 Feb 2003 10:57:04 -0500
|
|
You can pass the value as a variable to the next page. Let's say you want to
pass the value 12345 from Page1.asp to Page2.asp and the value 12345 lies in
the input field named "DirectoryCode". You can reference it like this on
Page2:
Directory Code from Previous Page: <%=request.form("DirectoryCode")%>
or you can pass it as a parameter like this:
<a href="Page2.asp?DirectoryCode=12345">
Hope this helps.
-----Original Message-----
From: Jerry Brown [mailto:jbrown@b...]
Sent: Friday, February 21, 2003 10:06 AM
To: Access ASP
Subject: [access_asp] passing data between pages
HI,
I am new, and i have seen other questions similar to the one i want to
ask, but i'm still not getting it. I want to pass the value of one field
to a field on a different page.
Example:
If Directory Code on the page is 12345, i want to open another page, in
add mode, and have the directory code fields value on the new page be
12345. I have been playing with Post and Get, but it ain't happening for
me. Can someone please point me in the right direction.
Thanks in advance!
JB
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003
Message #3 by "Josh Katsaros" <katsarosj@y...> on Fri, 21 Feb 2003 21:45:17
|
|
> HI,
> I am new, and i have seen other questions similar to the one i want to
a> sk, but i'm still not getting it. I want to pass the value of one field
t> o a field on a different page.
> Example:
> If Directory Code on the page is 12345, i want to open another page, in
a> dd mode, and have the directory code fields value on the new page be
1> 2345. I have been playing with Post and Get, but it ain't happening for
m> e. Can someone please point me in the right direction.
> Thanks in advance!
> JB
Message #4 by "Josh Katsaros" <katsarosj@y...> on Fri, 21 Feb 2003 22:08:04
|
|
This assumes your code is similar to this:
FORM ACTION="whateverpage.asp"
When you post a form to a new page, all of the form values get passed
along with it, so you should be able to set the new form values equal to
the passed form values like:
VALUE="<% Response.Write Request.Form("FormValue") %>"
This is probably the easiest way.
If for some reason that doesn't work (which it should), try something
similar to the following format:
FORM ACTION="<% Response.Write "whateverpage.asp?Formvalue=" & Request.Form
("FormValue") %>"
This will post to the new asp page and pass the value of the form over
which you can retrieve using Request.Querystring("FormValue").
For example you can declare a variable FormValueHolder on the 2nd page and
set it equal to the querystring like:
FormValueHolder = Request.Querystring("FormValue")
Then set your field value equal to <% Response.Write FormValueHolder %>
Hopes this helps.
JK
> HI,
> I am new, and i have seen other questions similar to the one i want to
a> sk, but i'm still not getting it. I want to pass the value of one field
t> o a field on a different page.
> Example:
> If Directory Code on the page is 12345, i want to open another page, in
a> dd mode, and have the directory code fields value on the new page be
1> 2345. I have been playing with Post and Get, but it ain't happening for
m> e. Can someone please point me in the right direction.
> Thanks in advance!
> JB
|
|
 |