Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Members,

I have two webforms,
First form contains grid view,grid view contains multiple rows with paging enabled,
1)
I select page no 5 from grid view and click on any of the row from grid view which redirects to second webform
2)
If i press the back button ,gridview must display the data from page 5, but it displays data starting from page 1.

Please suggest some solution
Posted
Comments
Mohd Imran Saifi 20-Mar-12 9:06am    
just mention details more precisely;
Xeshan Ahmed 20-Mar-12 9:31am    
you are using back button of browser or some defined button on form ?
kishore sharma 20-Mar-12 9:49am    
u can put the page index in sessio("PageIndex")=2
then u can check in pageload and after u bind data
u can do like this GridAirportList.PageIndex = sessio("PageIndex")
try this

1 solution

This behavior is expected. The server has no idea if the page you are loading has been visited before or if it is the first time. You will need to give it some clues, such as query string values or session variables to load the grid to the expected page.

If you are using the back button then storing the page index in a session variable before navigating would be the only option.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900