473,499 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How 2 pass a session/var from 1 form 2 another form


Hi!
For Example,
text for Product code, name (both is text) is from form A and I want
pass the Product Code, and name to form B
using eg. session('txtproduct') & session('txtname').

As in Form, Product code, name is get from database value.

some sample example I try ...

In formA
<form name=forma
method=post action="formAValidation.asp">
<INPUT type="text" name="txtName" value="<%=sName%>">
<input type=hidden name=txtName value="<%=sname%>">
<>

In formAValidation
sName = Request("txtProductName")
p/S: actual, it always get the first value although
the value have change ...

How can I do it???

In FormB how 2 get the product & name value ??
-
jeremylim200
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Jul 19 '05 #1
1 1424
I have done this before and used two forms, form 1 (page1) submits to form 2
(page2) that submits to page 3 which emails and enters into database.

All you need to do is on the second page where the second form resides is

txtproduct = request.form("txtproduct")
txtname = request.form("txtname")

then if you want them displayed on the second form place them in a text box
or write them to screen, if you want to hide the values place them in a
hidden element

eg
<INPUT type="text" name="txtName" value="<%=txtname%>">

then do the same in the page that processes form 2
"jeremylim2000" <je******************@mail.codecomments.com> wrote in
message news:je******************@mail.codecomments.com...

Hi!
For Example,
text for Product code, name (both is text) is from form A and I want 2
pass the Product Code, and name to form B
using eg. session('txtproduct') & session('txtname').

As in Form, Product code, name is get from database value.

some sample example I try ...

In formA
<form name=forma
method=post action="formAValidation.asp">
<INPUT type="text" name="txtName" value="<%=sName%>">
<input type=hidden name=txtName value="<%=sname%>">
<>

In formAValidation
sName = Request("txtProductName")
p/S: actual, it always get the first value although
the value have change ...

How can I do it???

In FormB how 2 get the product & name value ???

--
jeremylim2000
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7300
by: edward hage | last post by:
Hello , I want to pass some $_SESSION data to another page. I can pass PHPSESSID along using echo '<br /><a href="page2.php?' . SID .. '">page 2</a>'; However, I want to fill in a table...
4
11572
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
2
4583
by: Matt | last post by:
How to pass data back and forth between ASP and JSP page? Let's say I have Java objects, how to pass the data back to ASP page?? Or ASP has data, how to pass the data to JSP page?? Please...
1
2132
by: Al | last post by:
Ref:how to pass value along with click of a button hi,I have created a form that has single button. as follow <asp:button id="btnCallfunction" runat="server" text="func_call" onclick="add_int" />...
1
4609
by: crjunk | last post by:
I've got an aspx page that allows the user to select different options whenever they want to run a report. On this page, I have added an additional text box for the user to enter in comments about...
3
807
by: Wayne Wengert | last post by:
I have an application where a session variable is set in an ASPX page, The process calls an ASP page and when in that page the session variable appears to be null. How can I pass a session variable...
3
989
by: serge calderara | last post by:
Dear all, In practice, what kind of mechanism you guys are you using to pass forms variable, or control value if you need to pass them form to form. As session we cannot so much rely on...
17
7056
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the...
1
2882
by: menmysql | last post by:
hi to all, in my jsp page hyper links are there starting from "A" to "Z". when ever i click on any one of those links it should call itself and pass a parameter of its value. for example...
0
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7006
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7385
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5467
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4917
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.