Returning to same PageIndex in GridView

A

ArunDhaJ

Hi All,
I'm having a page with GridView with a link column in it. The gridview
contains the list of students. Upon clicking the Student name it would
further take to a Student Details edit page. After editing the details
and upon click of save, i would simply redirect the page back to
listing page.

Now my need is: consider there are 100 students and listed in Gridview
with page index 10. When I edit a student who is listed in 3rd page,
upon saving the details the listing page should return back to 3rd
page.

Few choices came to my mind like:
1. Passing the pageIndex back and forth in query string.
2. Using the student Id and manually looping through the Grid to find
the record number and calculating the pageIndex from the total records
and student record number.

Please suggest whether any of the above way would be better or is
there any new way....

Thanks in Advance
- ArunDhaJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top