Versions des environnements
Network:
Windows 2008 Server
J'aime (1)
Naomi Nosonovsky
>Hi,
>How would you pass a dataset from one page to another from the GridView? Here is the summary of what I have:
>
>An aspx page get/creates a dataset and shows the rows of the dataset in a GridView. One of the columns of the GridView is HyperlikField.
>When user clicks on the Hyperlink column another page will open (detailed view). I need to show the columns of the row selected in the GridView in the Detail Page. Of course I can pass the PK from the GridView page to the Detail Page but then the Detail Page has to create the dataset again and then find the row by PK. But this would slow down the execution.
>
>Ideally I would like to pass the dataset from GridView page to the Detail page. Or even better to pass just one row of the dataset to the Detail page. How would you do it?
>TIA
You could put your DataRow or DataSet into the session, but I would recommend just passing PK. Storing it in the session will use up more memory on the server, and you can run into cross talk between pages if the user opens multiple pages, or issues using the back button. Passing just the PK makes your page more stateless, and it should be a fast look up in your database. If you need to create the whole dataset again, you might have issues with your data access design.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement