Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 May 12th, 2004, 12:54 AM
Authorized User
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pass Parameter

How can I explicitly pass parameters from a asp page to another Is that possible to do without hidden variables
__________________
Try Try Try Until You Succeed
 
Old May 12th, 2004, 01:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can simply pass them as QueryString variables, like this:

<a href="Page2.asp?Param1=Bla&Param2=BlaBla">Click Me</a>

Then on Page2.asp, you can do this:

Dim Param1
Dim Param2
Param1 = Request.QueryString("Param1")
Param2 = Request.QueryString("Param2")

Note that the first parameter is separated by a ? while subsequent parameters are separated by a &.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 12th, 2004, 10:34 AM
Authorized User
 
Join Date: Dec 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi there,

There are two ways to submit the data to another page

1. In the form tag if u have "Method=post" then the data is posted in the hidden type
2. In the form tag if u have "Method=get" the the data is passed as Query string in the URL of IE.
if target form name is DispColor.asp, then

ex: Method=post.

   Color=request.form("cboColor")

ex: Method=get

   Color=request.QueryString("qryColor")

To pass the paramater for the DispColor.asp form as Query String,

<form name='frmSample' method=get action='Dispcolor.asp?qryColor=" & ColorSelected>
....
</form>


Mn Karthik





Similar Threads
Thread Thread Starter Forum Replies Last Post
pass parameter naeem_ul_hussan Classic ASP Basics 2 August 30th, 2007 11:18 AM
Pass a parameter in a link jmss66 Classic ASP Basics 1 October 20th, 2006 02:23 PM
How to pass parameter to sub-report . azeerum Access 1 January 3rd, 2005 04:26 PM





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