Is it possible to make href pass parameter/variable to results.asp? (1 Viewer)

rebelle

Rebelle
Local time
Today, 01:30
Joined
Aug 28, 2006
Messages
4
Ok, on my main.asp page I have a menu, when the user click on the main menu it expands showing links underneath when the user chooses/clicks on link it takes them to results.asp (displaying results from sql query where I have a where clause - ex. where EQID=1). So right now I making extra work by have a separate query with different where clauses for each link on my main.asp page. I want to see if I can the query up or create a variable, then have the href link pass /results.asp + with variable passing to query and display query results. Is this possible? I know it can probably be done if I had chosen to use drop down list or text box to hold but does anyone know if it will work with the way I have set it up?

Let me know if you need more information. :confused:
 

rebelle

Rebelle
Local time
Today, 01:30
Joined
Aug 28, 2006
Messages
4
Ok, still need help...when sorting

I was able to figure out in order to create one result.asp page, I input the direct path, ex: //test/testresults.asp?=3

This works when I am directed to testresults.asp, I see the results of my query with the parameter ID=3...but I have extra code to make the column headers of my results to where users can click it and it will then sort ASC of that column...well, when I do that now it requeries pulling all results from the table instead of just the ID=3 I passed...?

Anyone working with something like this and run into the same issue?
 

rebelle

Rebelle
Local time
Today, 01:30
Joined
Aug 28, 2006
Messages
4
Solution found

Ok, a co - worker helped me with my issues.

For the issue where I was getting more results than just the parameter ID=3 I passed was because I have a wildcard in my code. It was pulling all with ID=3 (all starting with 3). Removing the % cleared up the multiple records issue.

Also, for my sorting link - he had me add a session variable like below:

' search vars
Dim sTool
if (len(Request("ToolID")) > 0) Then
Session("ToolID") = Request("ToolID")
end if

sTool = Session("ToolID")
 

Users who are viewing this thread

Top Bottom