This topic is locked

advanced search question

7/16/2013 2:42:43 PM
ASPRunnerPro General questions
G
georgeb author

How do I have the advanced search go to the view page instead of the list page when an entry is found?

Sergey Kornilov admin 7/22/2013

Yes, this would be possible. I don't have a sample code however here is an idea.
List page: BeforeProcess event - run the current SQL query manually to see how many records it returns. If it returns zero or more than one record - do nothing. If it returns one record exactly you need to form the view page URL and redirect user there. Here is the sample redirect code:

Response.Redirect "table_name_view.asp?editid1=" & data("KeyColumnName")

Response.End