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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session variable output problems

Status
Not open for further replies.

sgore

Programmer
Jul 22, 2001
30
CA
I have a validation page that will redirect the user to the forms page if they have left out any required data.

<%
if ErrorMsg = &quot;&quot; then
Finish processing data ...
else
CopyFieldsToSession
Response.Redirect &quot;DataInput.asp&quot;
end if
%>

I have copied all of the fields to session variables so I can re-populate the form so the user doesn't have to re-enter it. The problem I am having is if there is a space in any of my fields when I try printing out my session variable only the first part of the variable is printed.

eg. Full Name: Jane Doe

DataInput.asp
...
<% for i = 1 to count %>

<input type=&quot;text&quot; name=&quot;Fullname<%=i%>&quot; value=<%=session(&quot;iname&quot; & i)%>>
<% next %>
...

Output: Jane

My output is only Jane the Doe is missing. I have never ran into this problem before. I have tested on all of the fields that can have spaces in them (i.e. address, phone, etc) and they all fail when I use the Response.Redirect.

If all the data is valid the form processes fine to the next
page where the full name is printed fine??

Any thoughts??



 
Please ignore this post!!

It was a syntax error... I was missing a &quot; in a few places..

Sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top