send a list between calls from a webform page

0

Good, I have a dataGridview page, one of the datagridviews (gridviewSelection) is filled according to the selections made in the other two. Then, I must keep in memory the objects that have that gridview so that they are loaded with the new selected objects.

The question would be how to command between calls that list of objects. so that when you refresh the page do not lose the previous selection

    
asked by NioDeTark 24.10.2017 в 15:55
source

1 answer

1

There are many ways to transport data between page requests, and they vary depending on the requirements of the application per se (How the amount of data to be transferred, the relevance of the data in terms of security and the load that you want to allocate to the client / server).

In your case, if the objects you want to preserve are a list of type String and do not carry much data, you can use a ViewState to store it on the client side.

Or if you prefer to work on the server side you can use a SessionState .

Otherwise, if you are looking to save a type Object that means a large amount of data, it is better to integrate the web application with a database.

Here you have more information to make the best choice. Luck!

    
answered by 31.10.2017 в 02:04