passing values

S

sircooljoe

Hello again,
I am having an issue I don't seem to be to resolve from all the advise I
found so far.
I have a form.
Reg1.asp: This page provides a drop down menu of the users. Once submit is
pressed it passes to Reg2.asp
Reg2.ASP: This page has the drop down for user (showing just the user
selected) and a second drop down that shows distince accounts associated with
them. Then passes to Reg3.asp
Reg3.asp: This pages shows the 2 drop downs mentioned above with thier
respective distinct values. Then there is a form to collect contact
information.

The issue I have, is there is a 3rd field I must post back to the database
from Reg3.asp. This field is the respective account number associated with
the user and account. I do not want this field to be visible as it has no
value to the people using the form, it's for the people using the data off
the backend. So I don't want to create a 3rd page to bring that value into
another field.

I have tried the following:
On Reg2.asp: added the session string: <%
Session("SoldTo")=Request.Form("SoldTo") %>
On Reg in the actual form: <input value="<%=Session("SoldTo") %>" size="20"
name="SoldTo">

I will eventually hide the "SoldTo" box, but I am trying to get it to work.

Everything else posts ok, but I am still not getting the "SoldTo" data to
post
 
S

Stefan B Rusynko

Your logic is backwards
In Reg (1st form ) there will never be a value for Session("SoldTo")
- because it is not set until Reg2 (2nd form) in
Session("SoldTo")=Request.Form("SoldTo") %>
And if you are using a Sesion variable you don't need to pass it from form to form
- just set it in Reg3 (3rd form) as say
Session("SoldTo")="somevalue"
and add it to the last form as a hidden form field
<input type="hidden" value="<%=Session("SoldTo") %>" name="SoldTo">

As for the unique value of SoldTo associated with each user
- use something in your DB (say a new account # in your DB or the user login ID)
- or use a unique session variable say Session("SoldTo")=Session.SessionID

See http://www.devguru.com/Technologies/asp/quickref/session_sessionid.html
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hello again,
I am having an issue I don't seem to be to resolve from all the advise I
found so far.
I have a form.
Reg1.asp: This page provides a drop down menu of the users. Once submit is
pressed it passes to Reg2.asp
Reg2.ASP: This page has the drop down for user (showing just the user
selected) and a second drop down that shows distince accounts associated with
them. Then passes to Reg3.asp
Reg3.asp: This pages shows the 2 drop downs mentioned above with thier
respective distinct values. Then there is a form to collect contact
information.

The issue I have, is there is a 3rd field I must post back to the database
from Reg3.asp. This field is the respective account number associated with
the user and account. I do not want this field to be visible as it has no
value to the people using the form, it's for the people using the data off
the backend. So I don't want to create a 3rd page to bring that value into
another field.

I have tried the following:
On Reg2.asp: added the session string: <%
Session("SoldTo")=Request.Form("SoldTo") %>
On Reg in the actual form: <input value="<%=Session("SoldTo") %>" size="20"
name="SoldTo">

I will eventually hide the "SoldTo" box, but I am trying to get it to work.

Everything else posts ok, but I am still not getting the "SoldTo" data to
post
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top