Click to See Complete Forum and Search --> : How to drill down from summary to detail?


Kurt Survance
03-21-2000, 04:39 PM
I'm working on my first ASP project and I am having trouble figuring out the
best way to drill down to a detail page from a summary page.

TaskList.asp (code below) displays a summary grid of all open helpdesk incidents
by querying a SQL Server database. Incident.asp displays all the information
for a single incident based on the value of Session("IncidentID") when the
page is opened. Both pages are working fine independently of one another.

What I would like to do is be able to double click on a specific Incident
ID in TaskList.asp. The double click would set Session("IncidentID") to
the value of the Incident ID being clicked on then it would open Incident.asp.

I am looking for some advice as to the best way to accomplish this. Many
thanks for any help you can give.

Kurt Survance
Portland, OR

************TaskList.asp************

<HTML>
<HEAD>
<TITLE>Task List</TITLE>
</HEAD>
<BODY>
<CENTER>
<H1><FONT size=4>
Open Incidents
</FONT></H1>
<HR>
</CENTER>


<OBJECT RUNAT=Server ID=MyConnection PROGID="ADODB.Connection"> </OBJECT>

<TABLE BORDER="1">
<TR>
<TH>ID</TH>
<TH>STATUS</TH>
<TH>DESCRIPTION</TH>
</TR>

<! Begin server side script here>

<%

dim rsTaskList

myconnection.open Session("connectionstring")

SQLQuery = "SELECT IncidentID,Status,Description FROM vIncident where status
not like 'Closed' order by IncidentID desc"

set rsTaskList = myConnection.Execute(SQLQuery)

do until rsTaskList.eof
Response.Write "<TR> <TD>"
Response.Write rsTaskList("IncidentID")
Response.Write "</TD><TD>"
Response.Write rsTaskList("Status")
Response.Write "</TD><TD>"
Response.Write rsTaskList("Description")
Response.Write "</TD></TR>"
%>

<%
rsTaskList.movenext
loop

rsTaskList.close
set rsTaskList = nothing
MyConnection.close

%>
<! end server side script>
<HR>

</TABLE>
</BODY>
</HTML>




*******Incident.asp**************