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

Am doing example on gridview grid i have taken one link button,

after clicking that link button ,i want to send all data of selected row to next page.

can anybody tell me..?

Dixit Ashish 24-Oct-13 4:16am    

There are two ways to achieve that:

1)client side
2)Server side

With client side approach you can use query strings or cookies to pass the values to the next page. For that you will have to bind the client side onclick function to your link button using RowDataBound event of gridview. To read about RowDataBound event visit:[^][^]

With server side approach you will have to use RowCommand event of your gridview and store the details. Probably using Session object. On the next page you can access the details. To read about RowCommand event visit:[^][^]

If I would be doing this, I would have opted the first option but I would have used ID of the row as query string to pass to the next page so that the data could be retrieved from Database. That could have also resulted in retrieval of accurate data in case someone else modify the data in between the process.
Share this answer
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