Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET WebForms Sharepoint , +
Is there any specific harm or drawback if we use Session state in SharePoint 2010 ?

Actually we have a scenario in which we have to perceive the 100 rows (with seven column in each row) in a DataTable and perceive its values during the page refresh call that is being made on close of the SharePoint Modal Dialog box .

Actually we have to insert the rows to the datatable of parent page by opening a Modal Popup without submitting the data to the database .

Does storing the datatable with 100 rows in VIEWSTATE will be an alternate solution ,if Session state is not recommended ? Or we can go ahead with Session state ?
Posted 16-May-12 20:42pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Session is disabled by default in SharePoint. One reason is the memory usage may be invoked by thousands of users accessing the system. Although it can be enabled and set to use SQL Server, it isn't a recommended or common practice with SharePoint.
 
If the goal is to persist the data so it is available after closing the dialog there may be other alternatives. The client object model in SharePoint 2010 allows for asynchronous operations to refresh the data. The dialog framework also does not issue a postback when closing that I'm aware of.
 
SharePoint 2010 Client Object Model, Part 1[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I use ViewState all the time.
 
And it works good, PROVIDED that the SIZE of the data is "reasonably bounded" for the given network-access scenarios.
 
So the question is, "HOW BIG?" is the data when PERSISTED to the ViewState hidden field? If this is "too big" or not depends primarly upon network conditions; the ultimately issue with ViewState isn't that it must be downloaded, but rather that it must be sent BACK with each request - and connections are sometimes asymmetric in performance.
 
Just avoid using a DataTable as the default Serialization it uses works poorly with the serializer used in ASP.NET (which is quite efficient for primitive structure trees and collections that don't muck with a custom serialization).
  Permalink  
v6

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 270
1 Sergey Alexandrovich Kryukov 150
2 ChauhanAjay 120
3 BotCar 105
4 Dave Kreskowiak 100
0 Sergey Alexandrovich Kryukov 9,056
1 OriginalGriff 8,041
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100