Skip to main content
June 20, 2007
Question

Passing Parameters

  • June 20, 2007
  • 2 replies
  • 316 views
I am building a simple record entry site without any login requirements. On the INDEX.ASP page, a user enters basic contact information (name, address, etc) into a form. I would like to link a page to this with another form that allows those new users to select from a group of checkboxes. I am unsure how to pass the USERID (keyfield) from INDEX.asp to the second page.

Any help would be really appreciated.

Thanks,
Austin
This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

June 22, 2007
be sure that the form has the method="post" when you use: request.form("key") when you use "get" you use: request.QueryString

linking from index1.asp to index2.asp:

index1.asp: href="domain.com/index2.asp?Key1=Hello&Key2=World

index2.asp: response.write Request.QueryString("Key1") & " " & Request.QueryString("Key2")

hope this and input from Mike helps
regards
Sebastian
Inspiring
June 21, 2007
If the form posts to the second page use Request.form("userid") as the value where usrid is the name of the form field. If you want to have the value userid available for more than one page make a seesion variable out of the userid, this will help if they want to update info or for other pages. Session("UserID") = request.form("userid") put this right at the start of the code that inserts the record on the index page