Nov 17, 2014 10:51 AM|Siva Krishna Macha|LINK
further I had used viewstate but I faced difficulty while data inserting or deletion in data table
The syntax to get/update Session variable is same as that of ViewState. So, ideally you shouldn't face the problem in using one mechanism if you know how to use other mechanism.
although I am store session variable for single page I am not transfer them into multiple pages.
Generally if the data that will be used with in the page, then Session will not be used and as you specified ViewState is one of the alternatives.
so the remaining option available is to store session variable into database I believe it will be as fast as storing them into memory,
It depends on the website load. If there are more number of users, then more server resources will be consumed and even getting the data from IIS may be slow in such case. But if the users are less, then retrieving from IIS will be faster. Remember, the
moment you go for multiple servers - inproc is not right option.
On the other hand, getting the session from SQL will need another call to SQL to fetch the records. Under the hood, the data will be stored in serialized format and to get it into object, the deserialization will be performed by server. So this is a bit
of overhead - but SQL storage is most reliable as the data will not be lost even if the application pool is recycled or IIS is restarted etc.