This topic is locked

Sort records on a list page by a field

8/27/2007 11:55:23 AM
ASPRunnerPro General questions
G
gnabi author

I would like to sort records on _list.asp page based on a field (say Age). I know how can I create a link/button but I do not know the field name on the list page I should use. Here is an example, in this example age is the field name in table. what should I use insted of $XYZ?
<TD align=middle width="25%">Age<A

href="employee_list.asp?orderby={$XYZ}age"></A></TD>
Thanks in advance, gnabi

Sergey Kornilov admin 8/27/2007

ASPRunnerPro creates this functionality for you automatically.
You can sort data by clicking on column header.

G
gnabi author 8/29/2007

Thanks Sergey!

Actually the field I wanted to sort on does not exist on list page. I made a mistake when creating a link, Age in the following is case sensetive. After I change age to Age it works fine.
href="*_list.asp?orderby={$order_dir_Age}Age">Sort by Age
Thanks again!