Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2006, 04:28 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing Variables

Hoping some kind soul can help me out.

I have a page where a user inputs data into a form(Page 1). The data is then processed(in this case it's compared against a database for a match). If it matches, the user can choose to update/edit that record or enter different data(Page 2). The problem lies when I choose to edit that record(Page 3 should show the updated changes). I am unable to pass a certain variable from the starting page through... to the 3rd page.

I don't want to use QueryString so I am using hidden forms. I pass the variables from page 1 to page 2 successfully(Again, this is nothing more than the user filling out forms). But when I put the variable into a hidden form, it truncates the words. For example, if the variable was "Empty Set" it only passed "Empty." Since all data passed with this one variable will be 2 words, how can I get it to pass both words?

Thanks.

 
Old January 22nd, 2006, 01:17 PM
Authorized User
 
Join Date: Jun 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

first you could try to use session("your_session") which will be automatically passed over to the next page.

if it's a string use server.HTMLEncode("your_string")

 
Old January 22nd, 2006, 07:38 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I always consider sessions as a last resort and you certainly dont need to encode the value if its being posted via a form.

When you view the source (the html being rendered not the asp source) in page 2 is this the point where its truncated? Try using '" "' around your ASP when assigning a value to the hidden field.

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Variables silve1999 Pro Java 1 June 15th, 2006 12:54 PM
Passing variables karlirvin PHP How-To 4 December 2nd, 2005 08:02 PM
Passing variables acko ASP.NET 1.x and 2.0 Application Design 1 December 23rd, 2003 09:40 AM
Passing variables jesseleon Access VBA 4 October 24th, 2003 01:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.