Passing a variable using hidden method. 
Author Message
 Passing a variable using hidden method.

I have the following problem.
I am trying to pass a string "United States", to a next page, using a hidden
variable in a post method form. After I pass it, I can only see the first
word "United". The second word is missing.
How can I use the hidden post method to pass the whole string with a space
inside?
(I am using VBScript for ASP)

Thank you very much for your advice.

<%
strA = "United States"
%>

<form .... .... ... method = post>

<  input type="hidden"   name="A"   value=<%=strA%>  >

</form>



Fri, 06 Dec 2002 03:00:00 GMT  
 Passing a variable using hidden method.
->
NewVar = Escape("United States")
<-
// On the first page.
->
MyString = UnEscape("NewVar")
<-
// On the second page

Once MyString is unescaped you should have "United States" as a whole
unbroken string.

--
Dominic



Fri, 06 Dec 2002 03:00:00 GMT  
 Passing a variable using hidden method.
You can put double quotes around the value.

<  input type="hidden"   name="A"   value="<%=strA%>" >


Quote:
> I have the following problem.
> I am trying to pass a string "United States", to a next page, using a
hidden
> variable in a post method form. After I pass it, I can only see the first
> word "United". The second word is missing.
> How can I use the hidden post method to pass the whole string with a space
> inside?
> (I am using VBScript for ASP)

> Thank you very much for your advice.

> <%
> strA = "United States"
> %>

> <form .... .... ... method = post>

> <  input type="hidden"   name="A"   value=<%=strA%>  >

> </form>



Sat, 07 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. passing javascript variable into asp variable using vbscript

2. Variable Passing b/n Sub and parent reports, while hiding subreport

3. Type problem: passing variables to methods

4. Passing variables to a com object method written in VB

5. Application method or variable that measures memory used

6. Using variables as properties of a Method

7. Using a variable within WshShell object and Run method (newbie at work)

8. Copyfile method using variables......

9. POST variables not passed using ASP

10. Passing variables from one web page to another web page using JavaScript

11. POST variables not passed using WININET/ASP

12. How to pass vbscript array variable to shared object using ByRef

 

 
Powered by phpBB® Forum Software