Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple words not being passed through several pages 1

Status
Not open for further replies.

newconvix

IS-IT--Management
Jan 30, 2006
16
US
Hi everyone. This may be how ASP works, I'm not sure. Here is the dilemma - I've created 4 ASP/VBscript pages that act as an application (page 1 of 4, 2 of 4, etc). I'm trying to pass hidden variables to the following page. From the first page to the second page, everything works OK. However, from the 3rd page on, values with a space only return the portion before the space. For instance, "Just Testing" works fine from page 1 to page 2. However, when passing as a hidden variable to page 3, only "Just" is displayed.

Am I missing something or will I have to devise a workaround?

thanks!
- James
 
How are you passing your variables? QueryString? If so is it encoded?
 
My apologies. The first page is being passed using method post. I've tried post and get on the subsequent pages. Neither one worked.
 
Can you post us some code? This would help us troubleshoot your problem..

Cheers,

G.



Oxigen - Next generation business solutions
-----------------------------
Components/Tools/Forums/Software/Web Services
 
Here is the code for the initial index.asp file:

<!-- Code snippet begin -->
<html>
<body>
<form action="go1.asp" method="post">
<input type="text" name="strName">
<input type="submit" value="Submit">
</form>
</body>
</html>
<!-- Code snippet end -->

When I click the 'Submit', the variable is passed to go1.asp as expected. Here is the code for go1.asp:

REM Code snippet for go1.asp begin
<%
dim strName
strName = request.form("strName")
response.write(strName)
%>
<html>
<body>
<form action="go2.asp" method="get">
<input type="hidden" name="strName" value=<% response.write(strName) %>>
<input type="submit" value="Submit Again">
</form>
</body>
</html>
<!-- CODE SNIPPET END -->

The correct variable is being displayed, even if it contains a space. Now when I try to pass it to the third ASP page (go2.asp) only the first portion before the space is displayed.

Code for go2.ASP:

REM Begin
<%
dim strName
strName = request.querystring("strName")
response.write(strName)
%>
REM End

 
Ahh.. I see the problem.. :eek:)

In go1.asp, the following line:

<input type="hidden" name="strName" value=<% response.write(strName) %>>

it seems you forgot the quotes.. try this:

Code:
<input type="hidden" name="strName" value="<%response.write(strName)%>">

That will work much better.

Cheers,

G.

Oxigen - Next generation business solutions
-----------------------------
Components/Tools/Forums/Software/Web Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top