tags:

views:

32

answers:

1

I'm using SubSonic 3.0.0.2 and can't find the Url.CreateSortLink method.

Where is it? It was in 3.0.0.0. Has it been dropped?

A: 

I'm using AdventureWorks and listing the Employee table.

I got the answer for sorting the columns using v3.0.0.2:

<a href='<%= Url.Action("Index", "Employee", new { s = "EmployeeID" }) %>'>Employee ID</a>

On the back-end code:

string sortBy = Request.QueryString["s"];

IEnumerable<Employee> items = null;

if (String.IsNullOrEmpty(sortBy))
    items = Employee.GetPaged(pageNumber, pageSize);
else
    items = Employee.GetPaged(sortBy, pageNumber, pageSize);

return View(items);
kntcnrg