Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Request form data


Message #1 by smatheus@n... on Wed, 21 Mar 2001 21:34:10
I must be missing something simple.  I am asking the user to select an 

option from a drop down menu.  I want to write that selection to a Session 

Variable.  I have written other session variables based on RecordSets, but 

have not having any luck writing this one.



The code I am using is on page 2, but refers to page one.  On page 2 -

<%Session("text") = Request.Form("text")%>



Can anyone advise me on things to look for?



Thanks, Steve
Message #2 by Shaun Steckley <SSTECKLEY@P...> on Wed, 21 Mar 2001 19:52:30 -0500
What problems are you having?  Any error messages?



-----Original Message-----

From: smatheus@n...

[mailto:smatheus@n...]

Sent: Wednesday, March 21, 2001 4:34 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Request form data





I must be missing something simple.  I am asking the user to select an 

option from a drop down menu.  I want to write that selection to a Session 

Variable.  I have written other session variables based on RecordSets, but 

have not having any luck writing this one.



The code I am using is on page 2, but refers to page one.  On page 2 -

<%Session("text") = Request.Form("text")%>



Can anyone advise me on things to look for?



Thanks, Steve



Message #3 by "Gerhard Wentink" <wentink@w...> on Thu, 22 Mar 2001 06:48:28 +0100
Did you check wether the the form data is really posted with Response.Write

Request.Form("text")?



Regards,



Gerhard Wentink

----- Original Message -----

From: <smatheus@n...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Wednesday, March 21, 2001 9:34 PM

Subject: [asp_web_howto] Request form data





> I must be missing something simple.  I am asking the user to select an

> option from a drop down menu.  I want to write that selection to a Session

> Variable.  I have written other session variables based on RecordSets, but

> have not having any luck writing this one.

>

> The code I am using is on page 2, but refers to page one.  On page 2 -

> <%Session("text") = Request.Form("text")%>

>

> Can anyone advise me on things to look for?

>

> Thanks, Steve

>



Message #4 by "Craig Flannigan" <ckf@k...> on Thu, 22 Mar 2001 08:17:24 -0000
Sounds silly this, but I had this problem on the other day.

Nothing logical, but I removed the drop down, and recreated

it, and it worked.



HAve you ensured that you've got the drop down in the form?



Craig.



-----Original Message-----

From: smatheus@n...

[mailto:smatheus@n...]

Sent: 21 March 2001 09:34 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Request form data





I must be missing something simple.  I am asking the user to

select an

option from a drop down menu.  I want to write that

selection to a Session

Variable.  I have written other session variables based on

RecordSets, but

have not having any luck writing this one.



The code I am using is on page 2, but refers to page one.

On page 2 -

<%Session("text") = Request.Form("text")%>



Can anyone advise me on things to look for?



Thanks, Steve



Message #5 by smatheus@n... on Thu, 22 Mar 2001 14:10:50
> Did you check wether the the form data is really posted with 

Response.Write

> Request.Form("text")?

> 

> Regards,

> 

> Gerhard Wentink

> ----- Original Message -----

> From: <smatheus@n...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Wednesday, March 21, 2001 9:34 PM

> Subject: [asp_web_howto] Request form data

> 

> 

> > I must be missing something simple.  I am asking the user to select an

> > option from a drop down menu.  I want to write that selection to a 

Session

> > Variable.  I have written other session variables based on RecordSets, 

but

> > have not having any luck writing this one.

> >

> > The code I am using is on page 2, but refers to page one.  On page 2 -

> > <%Session("text") = Request.Form("text")%>

> >

> > Can anyone advise me on things to look for?

> >

> > Thanks, Steve

> >

> 

I received a suggestion about using:



Session(var) = CStr(Request.Form("whatever")



I am half way there.  The data is now being passed, but the data is two 

words seperated by a space and it is only passing the first word.



I am using the selected data in a SQL statement for a recordset and need 

both words.  As an example, the dropdown selected and displayed is "text 

file".  The session variable only passes, "text".



Is there any way to correct this?

Message #6 by "Gerhard Wentink" <wentink@w...> on Thu, 22 Mar 2001 21:25:21 +0100
I don't have a clue. Normally the  value of a dropdown or select box is

posted with spaces (although I don't really know whats going on behind the

curtains).

Could you post some code to check out, please?

Regards,



Gerhard Wentink

----- Original Message -----

From: <smatheus@n...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Thursday, March 22, 2001 2:10 PM

Subject: [asp_web_howto] Re: Request form data





> > Did you check wether the the form data is really posted with

> Response.Write

> > Request.Form("text")?

> >

> > Regards,

> >

> > Gerhard Wentink

> > ----- Original Message -----

> > From: <smatheus@n...>

> > To: "ASP Web HowTo" <asp_web_howto@p...>

> > Sent: Wednesday, March 21, 2001 9:34 PM

> > Subject: [asp_web_howto] Request form data

> >

> >

> > > I must be missing something simple.  I am asking the user to select an

> > > option from a drop down menu.  I want to write that selection to a

> Session

> > > Variable.  I have written other session variables based on RecordSets,

> but

> > > have not having any luck writing this one.

> > >

> > > The code I am using is on page 2, but refers to page one.  On page 2 -

> > > <%Session("text") = Request.Form("text")%>

> > >

> > > Can anyone advise me on things to look for?

> > >

> > > Thanks, Steve

> > >

> >

> I received a suggestion about using:

>

> Session(var) = CStr(Request.Form("whatever")

>

> I am half way there.  The data is now being passed, but the data is two

> words seperated by a space and it is only passing the first word.

>

> I am using the selected data in a SQL statement for a recordset and need

> both words.  As an example, the dropdown selected and displayed is "text

> file".  The session variable only passes, "text".

>

> Is there any way to correct this?

>



Message #7 by "Curtis F. Barnett" <cfb@s...> on Thu, 22 Mar 2001 15:18:36 -0600
My guess is on Page 1 you don't have the value you are trying to pass

properly quotes encapsulated. If it's a dropdown select on page 1 try:



Response.Write("<OPTION VALUE='Two Words'>Two Words")

or

Response.Write("<OPTION VALUE=""Two Words"">Two Words")



> -----Original Message-----

> From: Gerhard Wentink [mailto:wentink@w...]

> Sent: Thursday, March 22, 2001 2:25 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] Re: Request form data

>

>

> I don't have a clue. Normally the  value of a dropdown or select box is

> posted with spaces (although I don't really know whats going on behind the

> curtains).

> Could you post some code to check out, please?

> Regards,

>

> Gerhard Wentink

> ----- Original Message -----

> From: <smatheus@n...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Thursday, March 22, 2001 2:10 PM

> Subject: [asp_web_howto] Re: Request form data

>

>

> > > Did you check wether the the form data is really posted with

> > Response.Write

> > > Request.Form("text")?

> > >

> > > Regards,

> > >

> > > Gerhard Wentink

> > > ----- Original Message -----

> > > From: <smatheus@n...>

> > > To: "ASP Web HowTo" <asp_web_howto@p...>

> > > Sent: Wednesday, March 21, 2001 9:34 PM

> > > Subject: [asp_web_howto] Request form data

> > >

> > >

> > > > I must be missing something simple.  I am asking the user

> to select an

> > > > option from a drop down menu.  I want to write that selection to a

> > Session

> > > > Variable.  I have written other session variables based on

> RecordSets,

> > but

> > > > have not having any luck writing this one.

> > > >

> > > > The code I am using is on page 2, but refers to page one.

> On page 2 -

> > > > <%Session("text") = Request.Form("text")%>

> > > >

> > > > Can anyone advise me on things to look for?

> > > >

> > > > Thanks, Steve

> > > >

> > >

> > I received a suggestion about using:

> >

> > Session(var) = CStr(Request.Form("whatever")

> >

> > I am half way there.  The data is now being passed, but the data is two

> > words seperated by a space and it is only passing the first word.

> >

> > I am using the selected data in a SQL statement for a recordset and need

> > both words.  As an example, the dropdown selected and displayed is "text

> > file".  The session variable only passes, "text".

> >

> > Is there any way to correct this?

> >

>

>

>




  Return to Index