Click here to Skip to main content
16,019,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one grid on page1, on selectindex of grid, i redirect user to another page2.
now when i want to comeback to page1 from page2, i want to display user same data in page1, which he has before redirect to page2.
How can i accomplish this.
Any sample code is helpful.
Posted
Comments
Ankur\m/ 17-Feb-11 0:58am    
[In follow-up to your comment to my answer]
Create a DataTable from that 'selection' and store it in a Session Object. What's the problem?!

The same way you have shown data on the grid first time (probably getting it from database).

The other way would be, as you mentioned in your question subject, to store it in a Session object but be careful that the number of records are not too much.
 
Share this answer
 
Comments
Sandeep Mewara 17-Feb-11 0:47am    
Comment from OP:
actually,i am bind my grid, 20 times based on 20 selections from diffrent controls parameters.
how to pass each dataset in session.
Ankur\m/ 17-Feb-11 0:56am    
Create a DataTable from that 'selection' and store it in a Session Object. What's the problem?!

Edit - Ah, Sorry, I replied it to you. Let me put this comment below the question.
You need to maintain state when you do a round trip between pages.
See here[^] for some options.

Otherwise, check on mdsn.
 
Share this answer
 
Hope this[^] article might also hive you an idea.
 
Share this answer
 

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