473,382 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 1423
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
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
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
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
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
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
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.