Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass dataset from GridView to another page
Message
 
 
À
17/10/2013 11:28:16
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01585731
Message ID:
01585754
Vues:
28
>>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.

First, thank you for your suggestion. It probably will work well. You see, the dataset is created NOT from the database but from an XML file. That is, dataset is populated by reading an XML file. So "reloading" the dataset should be fast. It would be nice if I learned how to read from XML (into a dataset) by the PK value in the XML. That is, just one row. This way, the process would be even faster.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform