Forum Moderators: open
I want when a visitor clicks on the link to go to a new page that shows all the records information.
The page that shows all the record information will be details.asp and I think the code would be something like:
myvariable=Request.QueryString("ID")
SELECT * FROM table WHERE columnheading=myvariable
Than my table for the output would look something like this:
<td><font face="Arial, Helvetica, sans-serif" size="1"><%=objRS("DateEntered")%></font></td>
<td><font face="Arial, Helvetica, sans-serif" size="1"><%=objRS("BugDescription")%></font></td>
<td><font face="Arial, Helvetica, sans-serif" size="1"><%=objRS("SimulatorsAffected")%></font></td>
Am I on the right track?
Also on the original page where it shows all my records and the link resides, where do I tell it to go to details.asp?
Thanks for your help
The only other thing you have to anticipate is that people might go directly to the detail page without clicking - so the first query will fail. I usually give the variable that captures the QueryString a default value. Then, check if the QueryString exists and if so, set it to the variable.
myvariable= trim(Request.QueryString("ID")) & ""
if myvariable <> "" then
' good to go
And using * is a bad habit try using just the fields you need:
SELECT DateEntered, BugDescription, SimulatorsAffected, Tnum FROM table WHERE columnheading=myvariable