Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Tranfering variable from a asp form page to a ACTION page

Reply
Thread Tools

Tranfering variable from a asp form page to a ACTION page

 
 
Jack
Guest
Posts: n/a
 
      12-22-2004
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.

 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      12-22-2004
> 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      12-22-2004
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)
 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12-22-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >

>
>
>

 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      12-22-2004
Okay, but in what type of element does it exist? <input, <legend, <span,
<textarea, etc.?

Ray at work

"Jack" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.
> > >

> >
> >
> >



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      12-22-2004
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.


 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12-22-2004
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" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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.
> > > >
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
Jack
Guest
Posts: n/a
 
      12-22-2004
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.
>
>
>

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      12-22-2004
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"


 
Reply With Quote
 
Scott McNair
Guest
Posts: n/a
 
      12-23-2004
"=?Utf-8?B?SmFjaw==?=" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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")
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call document.form.action when form is a variable brian.gaber@pwgsc.gc.ca Javascript 4 03-17-2008 06:24 PM
Struts: 1 action, 1 Form, several views handled by 1 only action. Any idea for better design? John Java 0 06-26-2007 11:22 PM
Tranfering Mp3 from Mp3Rocket to Rhapsody Libuary? How Sandra28 Computer Support 2 11-16-2006 09:03 AM
nikon transfer software - problem tranfering "today's date" Hector Polector Digital Photography 2 10-16-2006 09:40 AM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments