473,383 Members | 1,872 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,383 software developers and data experts.

Tranfering variable from a asp form page to a ACTION page

Hi,
I got a asp form page where the POST ACTION = confirmation.asp page is used
to save the values collected from text boxes from the form in a database.
For example txtTotalOutlay field is being used in confirmation.asp page to
update a database field.

However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.
However, in the confirmation field I need to bring the contents of NetOutlay
and store it in the same table as the other field. I am wondering whether
putting the value of the NetOutlay in Session variable and using in the
confirmation.asp field would be the right approach or there be any better way
to resolve this. Any help is appreciated.
Thanks.

Jul 22 '05 #1
9 2159
> However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.
What is it then?

Ray at work
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com... Hi,
I got a asp form page where the POST ACTION = confirmation.asp page is used to save the values collected from text boxes from the form in a database.
For example txtTotalOutlay field is being used in confirmation.asp page to
update a database field.

However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.
However, in the confirmation field I need to bring the contents of NetOutlay and store it in the same table as the other field. I am wondering whether
putting the value of the NetOutlay in Session variable and using in the
confirmation.asp field would be the right approach or there be any better way to resolve this. Any help is appreciated.
Thanks.

Jul 22 '05 #2
Ray Costanzo [MVP] wrote on 22 dec 2004 in
microsoft.public.inetserver.asp.general:
However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text
field.


What is it then?


an error ?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 22 '05 #3
The value of netoutlay field is not captured from the user. Rather it is a
calulated field by using the value from txtTotalOutlay. Hope I was clear
enough here. Thanks.

"Ray Costanzo [MVP]" wrote:
However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.


What is it then?

Ray at work
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
Hi,
I got a asp form page where the POST ACTION = confirmation.asp page is

used
to save the values collected from text boxes from the form in a database.
For example txtTotalOutlay field is being used in confirmation.asp page to
update a database field.

However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.
However, in the confirmation field I need to bring the contents of

NetOutlay
and store it in the same table as the other field. I am wondering whether
putting the value of the NetOutlay in Session variable and using in the
confirmation.asp field would be the right approach or there be any better

way
to resolve this. Any help is appreciated.
Thanks.


Jul 22 '05 #4
Okay, but in what type of element does it exist? <input, <legend, <span,
<textarea, etc.?

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
The value of netoutlay field is not captured from the user. Rather it is a
calulated field by using the value from txtTotalOutlay. Hope I was clear
enough here. Thanks.

"Ray Costanzo [MVP]" wrote:
However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.

What is it then?

Ray at work
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
Hi,
I got a asp form page where the POST ACTION = confirmation.asp page is

used
to save the values collected from text boxes from the form in a
database. For example txtTotalOutlay field is being used in confirmation.asp page to update a database field.

However, there is a field in the form which is calculated field e.g.
NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field. However, in the confirmation field I need to bring the contents of

NetOutlay
and store it in the same table as the other field. I am wondering whether putting the value of the NetOutlay in Session variable and using in the confirmation.asp field would be the right approach or there be any

better way
to resolve this. Any help is appreciated.
Thanks.


Jul 22 '05 #5
Jack wrote:
The value of netoutlay field is not captured from the user. Rather it
is a calulated field by using the value from txtTotalOutlay. Hope I
was clear enough here. Thanks.
Ray Costanzo [MVP] wrote: Okay, but in what type of element does it exist? <input, <legend,
<span, <textarea, etc.?


IOW, the value has to be stored in an html element whose name attribute has
been set in order for it to be passed to the ACTION page. You can put in in
an INPUT element of type "hidden"

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #6
Actually, in the main form there are about eitht text fields where the user
inputs values. Based on the values, some calculated fields are displayed on
the form. Hence
NetTotalOutlay can be termed as a variable that stores values by the use of
text field input value. The variable is used to display the NetToalOutlay.
Thus, it is neither of the above.
Thus the above variable need to be used in the confirmation.asp field to
update
one of the table fields.
The Hope this helps. Thanks Ray.

"Ray Costanzo [MVP]" wrote:
Okay, but in what type of element does it exist? <input, <legend, <span,
<textarea, etc.?

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
The value of netoutlay field is not captured from the user. Rather it is a
calulated field by using the value from txtTotalOutlay. Hope I was clear
enough here. Thanks.

"Ray Costanzo [MVP]" wrote:
> However, there is a field in the form which is calculated field e.g.
> NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field.
What is it then?

Ray at work
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
> Hi,
> I got a asp form page where the POST ACTION = confirmation.asp page is
used
> to save the values collected from text boxes from the form in a database. > For example txtTotalOutlay field is being used in confirmation.asp page to > update a database field.
>
> However, there is a field in the form which is calculated field e.g.
> NetOutlay = .90 * txtTotalOutlay. This NetOutlay is thus not a text field. > However, in the confirmation field I need to bring the contents of
NetOutlay
> and store it in the same table as the other field. I am wondering whether > putting the value of the NetOutlay in Session variable and using in the > confirmation.asp field would be the right approach or there be any better way
> to resolve this. Any help is appreciated.
> Thanks.
>


Jul 22 '05 #7
Thanks for the help Bob. Here is a quick question. Does it make any sense if
I try to put the variable(Netoutlay) in a session vairable and try to use it
in the confirmation.asp form? Conceptually, does it make any sense? Thanks
PS: Do you have any link for hidden INPUT element example?

"Bob Barrows [MVP]" wrote:
Jack wrote:
The value of netoutlay field is not captured from the user. Rather it
is a calulated field by using the value from txtTotalOutlay. Hope I
was clear enough here. Thanks.

Ray Costanzo [MVP] wrote:
Okay, but in what type of element does it exist? <input, <legend,
<span, <textarea, etc.?


IOW, the value has to be stored in an html element whose name attribute has
been set in order for it to be passed to the ACTION page. You can put in in
an INPUT element of type "hidden"

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 22 '05 #8
Jack wrote:
Thanks for the help Bob. Here is a quick question. Does it make any
sense if I try to put the variable(Netoutlay) in a session vairable
and try to use it in the confirmation.asp form?
If it's being calculated server-side, then there is no reason not to use a
session variable
Conceptually, does it
make any sense? Thanks PS: Do you have any link for hidden INPUT
element example?


Do a search at msdn.microsoft.com/library for "input element". All the
documentation can be found there.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #9
"=?Utf-8?B?SmFjaw==?=" <Ja**@discussions.microsoft.com> wrote in
news:3A**********************************@microsof t.com:
Any help is appreciated.


On the client:

<%MySecretValue = 12345%>

<form method=post action="xxx.asp">
<input type=text name=UserName><br>
<input type=text name=PhoneNo><br>
<input type=hidden name=SecretValue value='<%=MySecretValue%>'>
</form>

-------------------

On the server:

UserName = Request.Form("UserName")
PhoneNo = Request.Form("PhoneNo")
SecretValue = Request.Form("SecretValue")
Jul 22 '05 #10

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

Similar topics

6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
3
by: Geoff Winsor | last post by:
Hi, I am experiencing a problem with recalling a session variable which stores whether a person is logged in to a "members only" section of a website. This area of the site has been working...
1
by: Larry L | last post by:
I'm pretty novice at javascript, and it took me this long to understand what is happening in my page so far. On my page I do several things, requiring user input, to create a variable that I...
6
by: tencip | last post by:
Hi everyone, So, i've got a form that is very simple. It hold three elements: username, password, and domain. The goal here is to have the form submit the login to an administrative section...
1
by: stephane | last post by:
I have a problem which must be in this : print" <script type='text/javascript'> document.location.replace('http://127.0.0.1/add_task.php?req_id={$maxValue}&tk_request_name={$req_name}');...
5
by: TRB_NV | last post by:
I'm losing information from my Session when I change pages or start the same page over again. I simplified the code so the example is really clear. The sample code that follows is supposed to...
3
by: PseudoMega | last post by:
I'm working with a PHP page I wrote which searches through records in a MySQL database. I have a <form method="post"which currently passes all of search variables into the session array. I'd...
7
by: Schmidty | last post by:
Okay...I have another 'newbie' question; I have a function that loads a page and the action is $_SERVER; In the form that is in a function(method?) within a class a variable is passed back to...
2
by: ravisuguna | last post by:
Hi, I have a php page which has some checkboxes ,textfields and values.If I select a checkbox ,a particular value will be displayed in a textfield.I have a "go"button in the same page.I want the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

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.