State Management :: State Management Using Shared Class?

May 29, 2010

I am doing a POC of making my website run faster. Currently it stores huge object data in Session while passing information from one page to another. What I was thinking is to use shared methods and properties instead of session. It works, but wanted tocheck if this is an optimum way to do it. Below is the code that does not use session but still pass object data from one page to another:


View 1 Replies

Similar Messages:

State Management :: Session State Is Shared Between The Tabs?

Aug 6, 2010

We have a common problem with tabbed browsing in Internet Explorer is that the session state is shared between the tabs.

Due to this our user can face many issues like

1) Suppose user has opened a .aspx page for (clientId=1) and editing it in one tab and at the same time user is editing another client(ClientID=2). And both are using same in session.

Due to the session sharing when page will auto refresh the first tab with (clientId=1) will see the data of clientId=2.

Its clear that the session is shared between the tabs.

I have also implemented the ASP.NET 2.0 offered solution by way of the following config setting
<sessionState mode="InProc" cookieless="UseUri"></sessionState>

But still our users are facing this issue. I am looking for solution to disabled the Tab programaticaly and also i wanted to know how to clear the cache programatically.

View 7 Replies

State Management :: Session Getting Shared Among Different Users?

May 19, 2010


Above is my configuration.

Because one user is getting the session values of other users due to some reason that I dont know .

View 3 Replies

State Management :: Static/Shared Confusion?

Sep 16, 2010

my understanding static/shared objects will be saved in a memory that is shared by all instances of the application,so if we set a value to shared object from inst1 & i should be able to access it via instance2(may be in same computer or anywhere)Actually:In my application,previously they defined shared dataset to hold some information specific to the user,still now i cant reproduce the error that same value shared across all application instances.Please help me to solve or clarify this.

View 3 Replies

State Management :: Object Is Byref And Shared?

Apr 14, 2010

I have a Session Varaible in which I am assinged a List of "MLoad" objects (Ex:- 10 MLoad objects) from the initial search. After that basing some icon click i am trying to get the new filtered results (Ex:- say 1 MLoad object) and assigning them to the public property "ListSearchResults" (See code below). When i do this the original results in the Session are changed(10 MLoad objects are getting replaced with 1 MLoad object ==> which just been filtered). What i have to do so that the "ListSearchResults" in Session is not changed. It is now byref, how to make it byval?

in acreate an object See below code and after retreving t


View 1 Replies

State Management :: Shared Variable But Specific To One Login?

Apr 28, 2010

I dont know if im writing in a right place. this is about class in App_Data ( folder that i want to user throughout system. but specifically for one user.

lets say userA login to the system. then system will use classUser
FillProperty and set variable like Name, Username, UserId (a property of his own, the modifier is
shared). the purpose is so that it can be used in any page. it behaves like (when we want to call name of user that already authenticated)

I can do it fine. but once i test login with UserB in other browser, it change that shared variable with property of userB.what i want is, when A login, he will set the classUser with his data and data that called by him is his data. and when B login, he will do the same, but he will use his data without replacing userA is the code :

-------------- CLASS -------------[Code]....

View 5 Replies

State Management :: Cache Settings On Shared Application Pool?

Sep 17, 2010

I have several web applications on a server using the same application pool. The worker process usually takes a lot of ram but usually only from one application. I can successfully limit the cache usage by setting "PrivateBytesLimit" in web.config file when the application uses it own dedicated application pool.

Does anyone know how this setting will be applied when using shared application pool? Is it per application, per worker process or per application pool? Also if it is not per application which setting from which application will be applied?

View 1 Replies

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in

View 2 Replies

State Management :: State Management And Page Navigation?

Nov 18, 2010

i have a form on page1.aspx with several controls (textbox, dropdownlist, etc).on Page1 PageLoad event i load data from database and performe databinding.From Page1 a user can, by clicking a specific button, move to Page2.aspx to insert some details and, after saving details, he returns to page1.

if save changes are made on control on page1 before save them to db, obviously, these are lost on return from page2 (because are reloaded on pageload from db).How can i save control status between pages round trip?

View 3 Replies

State Management :: Get The Correct Concept For State Management?

Aug 16, 2010

i need to know the full concepts state manegemnt in, which site i will get the correct concept for state management....

View 4 Replies

State Management :: Persisting A Class Object?

Nov 5, 2010

I wish to persist a class object across postbacks by using a single session variable/object/whatever.

The class has about a dozen single variable properties; and about a dozen table properties; and several methods. The main table tracks rows of sporting event results. The web site will collect one row at a time for each postback. The data in the object's constructor is based on a dataset, but the data in the class will grow each time I do a postback so I don't want to loose the information in the class. The data isn't very big - it will fill a single computer screen.

Being new to programming I am thinking that I can store the dataset in the session but that would slow down the response time because I the methods would have to be called to refine the data - or maybe I can just store the entire class object in a session.

View 3 Replies

State Management :: Keep Adding Value In Class Without Initialize It?

Sep 9, 2010

I have two class


List Class
Value Class

And List Class is inherits from Value Class


Public Class List
Inherits List(of Value)


I have Master Page and in master page i have user control, where i want to keep adding value in mention list class and i want to use this list class values in other pages.

How can i adding value in list class without intializing with new??

View 3 Replies

State Management :: Web Application Class Data Is Lost

Jul 14, 2010

i have an web application.


When i click button 1, a new list is created. But when i click button 2, it gives me error, saying that its a null list.

The changes i did in Button1_Click() are somehow rolled back. I want to keep the changes.

View 5 Replies

State Management :: How To Access Session Variable In The Class

Mar 27, 2010

How to access session variable in the class?

View 5 Replies

State Management :: Can't Retrieve Session Object From Class

Jun 30, 2010

my solution currently has a website project and a class library project. I am attempting to access a session object from my class library but it is always returning null. In a settings class in my class library I store these values like so:

private static SessionProperty<WebUser> _currentUser = new SessionProperty<WebUser>("CurrentUser", delegate { return new WebUser(); });
public static WebUser CurrentUser
get { return _currentUser.Value; }
set { _currentUser.Value = value; }

I can access this just fine from any aspx page codebehind like so:


However, if I attempt to do the same thing from a class in my classlibrary project it always returns null.

View 5 Replies

State Management :: Cant Access Object Property In Class?

Mar 28, 2010

I'm having a problem with a class library I'm building. I have a class called Users and inside this class I have a property called UserInfo that is an object. Both of the classes Users and UserInfo are built using MyGenerations dOOdads. When I create an object instance of the Users class I am able to access the UserInfo property without a problem in my Windows App, however when I using the same library in a website the UserInfo property continues to return a no reference error. Like I said when running it in a WinApp I have no problems at all, I can access the UserInfo property and likewise all of UserInfo's properties. I am also having problems trying to debug the library using the website. And again I have no problems when using the WinApp. The way I've set it up is I have the Class library project open, and then I add the WinApp project and then the website project. When I set the WinApp as the startup project and run it I have no problems, I can set breakpoints and step through the code no problem. But when I set the Website as the startup project and try to debug I get a massage saying the breakpoint won't be hit. I then do what it tells me and right click on the breakpoint and set the location to allow the source to be different. This lets me hit the breakpoint, but every time I hit F10 to step I get "There is no source code available for the current location." For every step I take. This is making it really hard for me to figure out what going on with the code in the website. Sorry for the lengthy explanation. Here's the Users class, again it works great in the WinApp, just not the website.


View 6 Replies

State Management :: Session Used In Thread Class Return Null

May 5, 2010

I want to use session in thread class but it return null in parent that is the page class.

View 4 Replies

State Management :: How To Persist A Class Object When Page PostBack

Oct 5, 2010

i have created a user control UserControl.ascx, in Code behind file of UserControl.ascx i have created an object of a class MyClass.cs,


if(!Page.IsPostback) {
objMyClass= new MyClass();

but when i click on button of UserControl.ascx page and try to access objMyClass object then it set as null, so how to persist MyClass object when page PostBack, i wanted to keep object persist till the user access the page, when user goes out of this page then object should distroy?


View 9 Replies

State Management :: Session Or Request In Class Without Passing As Parameter

Sep 3, 2010

I'd like to be able to reference the objects Session, Request, from a procedure without passing them in as parameters all the time. Is there a way to do this. For example, now I have


I'd like to call it like this "ContextPT.GetSession()" and have GetSession know how to find the Session object. I know this does not seem like a big deal in this case, but I have reasons.

View 1 Replies

State Management :: How To Use ViewState In Class Inside(App_code) Folder

Aug 23, 2010

i want to do some thing like this in in Class inside(App_code) folder i want to know how to do it with

Correct Syntax :
public static void GetViewStateValue(int StudentID,ViewState MyViewState)

View 7 Replies

State Management :: What Triggers SessionStateModule Class To Start A New Session

Apr 20, 2010

SessionStateModule raises a Start event with a new seesion. Is there a pointer to "deep dive" information?

In particular,

(1) I want to preserve Session state information across a postback to external (web-based) services in my VS 2008 development environment, but am finding that my code is triggering the creation of a new session.

(2) I am using IIS to host WCF Service calls, and it appears that many of those calls trigger the creation of a session. I would like to dive deeper into this, and try to manage (reduce) the number of sessions that are created and their behavior.

View 3 Replies

State Management :: Class Object Available To Multiple Events In The Code Behind?

Sep 1, 2010

I am trying to incorporate AJAX in my web project for the first time and it isn't working. I don't know how to instantiate a class once and use AJAX to update the dataset numerous times before updating the database changes using a postback.

My project is to learn AJAX with a class object. Clicking the button is supposed to increment a count by one using a class to store the count. Here is my class:


Here is my HTML code:


And here are my button click event code snippets:


My problem is that as I step through the code (after clicking on the second button) it instantiates a new class object each time which returns a value of 2 every time. I have tried to fix the problem by putting my counter class instantiation in the pageload event using "If Not IsPostBack Then ..." but my probem there is that the button click event block of code would not recognize the cCount class - it put the blue lines under the cCount

My goal is to have the class object available to multiple events in the code behind: especially using AJAX to build records in one of my DataSet tables Does anyone know how to handle this?

View 6 Replies

State Management :: Unable To Locate The Class SqlCacheDependency As Per This MS Article

Jan 31, 2011

I could not locate the class SqlCacheDependency as per this MS article!

View 2 Replies

State Management :: ViewState Does Not Exist In The Current Context In Another Cs Class

Feb 1, 2011

When I use Viewstate in another cs class file it showing error,.The Name Viewstate does not exist in the current context .

View 5 Replies

State Management :: Serialize/Deserialize A Custom Class In And Out Of A Session

Mar 18, 2011

I'm trying to save a custom class in a session, but it just never gets saved, along with other sessions. Note that my SessionMode = STATESERVER, and i cannot change it to INPROC as per our business requirement. This is my class

public class User : ISerializable
private int _userId;
public int UserId
get { return _userId; }
set { _userId = value; }
//custom class
private TDB.tdbUser _tdbUserDetails;
public TDB.tdbUser tdbUserDetails
get { return _tdbUserDetails; }
set { _tdbUserDetails = value; }
//collection of custom class Sites
private List<Sites> _assignedSites;
public List<Sites> AssignedSites
get { return _assignedSites; }
set { _assignedSites = value; }
public User()
//Constructor code
protected User(SerializationInfo info, StreamingContext context)
this._userId = (int)info.GetValue("_userId", typeof(int));
this._assignedSites = (List<Sites>)info.GetValue("_assignedSites", typeof(List<Sites>));
this._tdbUserDetails = (TDB.tdbUser)info.GetValue("_tdbUserDetails", typeof(TDB.tdbUser));
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
info.AddValue("_userId", this._userId);
info.AddValue("_assignedSites", this._assignedSites);
info.AddValue("_tdbUserDetails", this._tdbUserDetails);

The calling code is just this: (User)HttpContext.Current.Session["TDBUSER"];

View 2 Replies

Copyrights 2005-15, All rights reserved