Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello,

Display gridview selected row values on another page in asp.net, using cross page posting?

i don't want to use query string for display data in another page.

I want to be first, gridview select row and then display records in another page, without using query string.

please help me,

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted

Hi Ankit,

In your case you can't use Query strings because query string holds primitive type of data and their is a size limitation also, but as per your requirement you have table structure data; and you want to show that into another page in that case the session is best approach to achieve your requirement. Try with Session object store your selected rows into session object and in page2 check whether session contains value or not if there is a value then show the same in page2.
 
Share this answer
 
Comments
Agarwal1984 6-Oct-15 9:03am    
But session its not a good option, i want to retrieve data only selected row.
Session can be expire.
I want search any cross page posting.
There are many options
session,
cookies,
hiddenfield,
form fields,
application variables,
cache ,
Even you can make temporary table in database and can access in next page whenever you want,
 
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