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

passing variables 1

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have this in an ASP page:

name=request.form("name")
alias=request.form("alias")
..
response.redirect("test.asp")

How do i pass the "name" and "alias" values to test.asp?
 
response.redirect("test.asp?Name=" & _
Server.HTMLEncode(Name) & _
"&Alias=" _
Server.HTMLEncode(Alias)
??????
If it works, the variables will be in Request.QueryString and not Request.Form though you could use
Request("Name") Request("alias")
 
Thanks JohnYingling,

but I'm getting this error:

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

on running the ASP page.
 
U could use the method of John in this way (withowt _ charracter)
response.redirect("test.asp?Name=" & Server.HTMLEncode(Name) & "&Alias="&Server.HTMLEncode(Alias)

or u could use Server.Transfer function...

The transfer method sends all of the information that has been assembled for processing by one .asp file to a second .asp file.

Syntax
Server.Transfer ("test.asp")

Hope this helps you
________

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top