help with simple dotnet page

  • Thread starter Thread starter Tyro
  • Start date Start date
T

Tyro

Please provide a rough idea on how I can approach the following.

I have a page called student.aspx that looks like:

"See students by first letter of lastname (each letter is a link to the
current page)"
A B C D E F G .... Z

See students by gradelevel (each is a link to current page)
K 1 2 3 4 5 6 .. 12

Repeater based on what user clicked above
1234 Smith, Joe
5678 Thomas, Al
1838 Zeta, Bob

First Next Prev Last (paging for every 5 record)

For example, if I click B above it will display all students whose lastname
begins with B.

If I click K above, it will give me a list of all students who are in
Kindergarten

It has a listing of students (repeater) sorted by last name.

How can I pull this off so it would work with the dataset paging?

I can't seem to find this in any ASP.net book.

Thanks!
 
you can check QueryString to define the type of data set to display

e.g.

if Request.QueryString("LastName").Length=1 then
sql="select * from students where lastname like '" &
Request.QueryString("LastName") & "%'"
else if Request.QueryString("GradeLevel").Length>0 then
sql="select * from students where gradelevel='" &
Request.QueryString("GradeLevel") & "'"
else
sql="select * from students"
end if

and use that sql to get data out of the database

Alexey
 
Back
Top