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

Passing 2 URL parameters

Status
Not open for further replies.
Mar 17, 2005
147
US
Is it possible to pass 2 url parameters?

activities_details.asp?id=<%= rssecondaract.Fields.Item("aid").Value %>activityname=<%= rssecondaract.Fields.Item("activityname").Value %>
Steve
 
yes - You can have multiple querystring parameters - just separate each name/value pair with a [red]&[/red]
Code:
activities_details.asp?id=<%= rssecondaract("aid")%>[red]&[/red]activityname=<%= rssecondaract("activityname")%>

Also - you dont need the Fields.Item or the .Value bits in your code. These are the default so they can be left out. Leaves your code easier to read.

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
Ok what I am really struggling with now is that I have two recordsets to display info from different tables.

I am passing the 1 url parameter to both where the 1st recordset is set to = the url parameter and the second one is set to contains the url parameter but he second is not working.

I figure this way I am just passing the one parameter and should be able to filter many recordsets based on the one.

Its not working though could you offer perhaps some advise here?

Steve
 
As Tony suggested you can have multiple query string parameters...

First grab these parameters...something like this...

param1=Request.QueryString("id")
param2=Request.QueryString("activityname")

and then you can use these new variables param1 and param2 in your sql queries...

to make sure that these values are being passed on correctly...do a response.write to see the output...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top