English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Say I have a group of products, like a series of books, and I'd like the user to click to the series and have it automatically go to the first book in the series without having to key the original hyperlink to use "ID=1". In other words, I'd like the first book to appear automatically if they go to item.asp instead of having to have them use item.asp?ID=1.

2006-11-02 08:36:01 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

I'm not exactly sure what you're asking, but you can check to see if ID exists, and if not, set it to your default value:

'***Put ID in a string variable
strID = request.querystring("ID")

'***Check the length of the variable
'***If it's less than 1, it's empty
if len(strID) < 1 then
strID = "your default"
end if

If that's not what your asking, I think the other poster was on the right path with the SORT suggestion...

2006-11-03 05:05:16 · answer #1 · answered by Michael T 2 · 0 0

Yes you can sort your data through the SQL query. Sort by is the command you need to specify the field and default I believe is ascending and you can specify descending too.

2006-11-02 17:59:28 · answer #2 · answered by yairs2000 3 · 0 0

fedest.com, questions and answers