Mark Drelinger
asked on
Redirect with parameter if Recordset has only one record
I want to redirect a user if their recordset has only one result. When they are redirected, I need to pass the url variable. Otherwise, I will leave them on the results.asp page.
This is the code I have so far, but it does not work:
<%
If rsCustomerData_total = 1 Then
Response.Redirect("Contact Management ActivityAd d.asp? & var_Table_ID=(rsCustomerDa ta.Fields. Item("Tabl e_ID").Val ue)")
End If
%>
This is the code I have so far, but it does not work:
<%
If rsCustomerData_total = 1 Then
Response.Redirect("Contact
End If
%>
have a look at the recordCount property - http://www.w3schools.com/ADO/prop_rs_recordcount.asp
ASKER
any hints on syntax to include the required parameter in the url ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.