Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Help with ASP

Thread Tools
 
Search this Thread
 
Old Oct 22, 2002 | 04:00 PM
  #1  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Post

I am creating a series of ASP pages each with its own form.

FORM1 passes data to FORM2, FORM2 passes its data + FORM1 data to FORM3 etc.

Untill I get to the last form I will have all the form's data ready to pass to a database.

When I pass the data from FORM 1 to FORM 2 it carries over fine, but when FORM 1's data is passed to FORM3 it looses data, ie. anything after the first word disappears.

eg. if the data from FORM 1 is "Desktop PC", when it is eventually passed to FORM 3 it reads "Desktop".

Any ideas??

Cheers.
Reply
Old Oct 22, 2002 | 04:13 PM
  #2  
GaryK's Avatar
GaryK
Scooby Regular
 
Joined: Sep 1999
Posts: 4,037
Likes: 0
From: Bedfordshire
Post

rik,

its to do with the spaces. I remember a similar problem doing inline evaluation of querystring variables so

<%=variable%>

only showed the value up to the space, but

"<%=variable%>"

worked Ok, something along those lines, been a couple of months since I done any ASP and I cant test it here.

Cheers

Gary
Reply
Old Oct 22, 2002 | 04:19 PM
  #3  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Post

Im using <% asset=request.form("asset") %> in the header to request the data from the previous form, then where I want to insert the data I use <% Response.Write asset %>.

If the asset includes a space, when it goes two forms along, anything after the space is lost
Reply
Old Oct 22, 2002 | 04:23 PM
  #4  
GaryK's Avatar
GaryK
Scooby Regular
 
Joined: Sep 1999
Posts: 4,037
Likes: 0
From: Bedfordshire
Post

rik,

try assigning a page variable to the form var first:

strAsset = Request.Form("asset")

Then when you use it later you can do:

"<%=strAsset%>"

What do you want to use antiquated technologies like ASP for anyway?

Gary
Reply
Old Oct 22, 2002 | 04:24 PM
  #5  
chiark's Avatar
chiark
Scooby Regular
 
Joined: Jun 2000
Posts: 13,735
Likes: 0
Post

Exactly as said - you need to quote your variables in the HTML code...
Reply
Old Oct 22, 2002 | 04:25 PM
  #6  
chiark's Avatar
chiark
Scooby Regular
 
Joined: Jun 2000
Posts: 13,735
Likes: 0
Post

...and if there's any quotes in the variable, you need to do something with 'em
Reply
Old Oct 22, 2002 | 09:15 PM
  #7  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Post

Cheers, i'm pretty new to ASP so please forgive my ignorance

Should be a little better after my work funded ASP course next week
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Darrell@Scoobyworx
Trader Announcements
26
Jan 30, 2024 01:27 PM
Neil Smalley
ScoobyNet General
5
Nov 2, 2001 11:18 PM
ozzy
Scotland
6
Oct 24, 2001 01:04 PM
mega_stream
Non Scooby Related
2
Aug 9, 2001 07:51 PM




All times are GMT +1. The time now is 05:47 AM.