views:

66

answers:

3

I have a page that loads data into a grid. When the user selects one of the rows of the grid, I need to send them to another page and open that second page based upon the ID selected in the first page.

Currently, I'm posting back to the first page, building the grid, getting the ID from the row, stuffing it in session, then response.redirecting to the second page.

I'd like to avoid reloading the first page just to get the ID value, but I don't want to put the ID in a querystring.

I don't want to use server.transfer because I want the URL to switch to the second page.

Any suggestions would be appreciated!

A: 

Store an encrypted cookie

or

have the link post instead of get.

madcolor
A: 

Have you considered storing the ID in the command arguments of a button and then just checking that property one the button click and doing what your currently doing with the session? At least then you don't need to do the grid rebuilding and you could just stuff it in the session and do a redirect.

Kelsey
@Gern Blandston did you ever get this figured out? Ff this answer or another helped you, you should set an accepted answer so that others reading this question can locate the solution that helped you.
Kelsey
A: 

I found this answer, i think it might be what you are looking for.

Can the PostbackUrl be set for a GridView CommandField?

Phaedrus