Storing Data For A Particular Time In Mvc 2.0 Using Session State Concept?

Nov 23, 2010

I am using asp.net mvc 2.0 to implement shopping cart application.My situation is , I have a order page, there i am adding the products to the Cart.Below it will show the Cart total.Next i will go to the shopping cart page to delete or editing the items.In this page it will show the same cart total as in the Order page.

But once again if i go back to the Order page to order some more products to the cart,the cart total in the order page is showing 0 amount. This is my Shopping cart controller action method,

public ActionResult ShoppingCart(int eventID)
{
Event e = eRepository.GetEvent(eventID);
var cart = Stalbans.Models.ShoppingCart.GetCart(this.HttpContext);

[Code]....

So once i will go to the shopping cart page from the order page and again coming back to the order page it has to show the same cart total. Actually data is persisted in the cart total but it is not showing .Because if you add one more item its amount will added to the existimng cart total and then shows the current cart total. So for the first time i click back at that it has to show the already existed cart total in the cart total value.

View 1 Replies


Similar Messages:

State Management :: Storing Large Data In Session State?

Sep 18, 2010

We have a scenario where we need to store large tables of data on Session in asp.net page. on a highlevel we have to store following data

1> A table (table 1) with 1000 rows and 8 to 10 columns.

2> A table(table 2) with 500 rows and 8 to 10 columns (actually user can add the data from table 1 to table 2, so as user keeps on adding from table 1 we remove the data and put it in table 2)

3> Another table(table 3) with 1000-1200 rows each having 3 columns.

We are having a webfarm, so we need to store it in either SateServer of Oracle DB,What would be the performance implications of storing such huge data on the server.

One more thing is at any point of time max of 70 -80 people will be accessing our website, so will this cause any performance degradation?

View 7 Replies

State Management :: Taking Too Much Time To Fetch Data From .xls File And Storing It In To Database

Nov 6, 2010

I am fetching data from .xls file and storing it in to database. Then my users work on a single table where I stored all .xls data. But the problem is that it takes tooooo much time.. So, I want to use cache. But I never used this... Can any one tell me this example how can I use cache with database for increasing application speed?

View 2 Replies

State Management :: Check Session Is Storing Value Or Not?

Nov 11, 2010

anybody tell me how can i check session is storing value or not?

actully i am using first time session variable to store datatable gridview but do't know that is saving value or not actully in my grid when user inser first row entry then it is ok when click on new row button then new row generate but previous row value lost.

View 6 Replies

State Management :: Storing Datatable In Session Variable?

Oct 28, 2010

I am storing Datatable in Session variable in my project. Is it good practise to do so? The datatable has 20 fields and can run into 1000+ records. Will it hamper my application performance?

View 11 Replies

Web Forms :: To Maintain The State Of The Treeview Without Storing It In Session

Feb 10, 2010

I am using master page.

(1) to maintain the state of the treeview without storing it in session or view state or

(2) I am binding the treeview control dynamically from a xml. Even if I use session state is ther any option to use it without using SelectedNodeChanged event because when u click the treeview node , first master page will postback for this event and then the child page and then again the master page will post pack (as the child page has inherited the master page). So here in this case we are posting the master page twice and it is reducing the performance.

View 2 Replies

State Management :: How To Get List Of All Session On Server Without Storing Them Anywhere

Jun 3, 2010

get the list of all sessionid which will be running onto server without storing them anywhere.

View 7 Replies

State Management :: Storing Search Keyword In Session Variable?

Oct 27, 2010

I have heard alot about sql injection and how it is normally caused. Mostly sql injection in my opinion is caused through search boxes. Now my question is quite simple. Is it advisable to store the search keyword in a session variable to prevent sql injection? I don't want to expose the keyword through the querystring as it is prone to attacks. So in short there is no harm in using session variables to store the keyword right?

View 6 Replies

State Management :: Session Variable, Gridview Paging And Storing The ID?

Oct 18, 2010

I have a gridview and a checkbox. I am able to pass the checkbox id to a textbox in the same page. This is then passed as a session variable. However, when I place an option to page and select the checkbox items in the next page, the session variable resets.Please see below code, how do I store "all checkbox" throughout all paging and store it in the session page?

[Code]....

Behind code VB:

[Code]....

[Code]....

[Code]....

View 4 Replies

State Management :: Retrieving Login Infn. Other Than Storing It In Session?

Dec 28, 2010

I need to retrieve Username from the login page in my ASP.NET application so that it is available in other pages also. I am using VS2008. Is there any other of getting the value other than storing them in session.

View 4 Replies

State Management :: Asp Create New Session State Cookie Each Time On Debugging?

Jan 21, 2011

I'm using the following line of code to display the number of users currently logged on:

lblNoOfUsers.Text = Membership.GetNumberOfUsersOnline().ToString()

I'm still debugging my application so it's on the local server. As I debug and stop then debug again, eventually lblNoOfUsers.text turns to "0" instead of "1", even as I'm navigating my application. It only turns to "1" again if I log out and sign back in. It's almost as though Membership.GetNumberOfUsersOnline my login are referencing two different session states. How is this possible? Does asp.net create a new session state cookie each time I start debugging?

View 2 Replies

State Management :: Session Time Out Before Time Reach

Jan 10, 2011

<sessionState mode="InProc" timeout="300"></sessionState>

is my session related tag in web.config file but most of the time if i idle 20 minutes then its automatically timedout and went to my login page, is there any solution ?

View 5 Replies

Is It Safe Saving Credential Data In Session State For Short Period Of Time

Jan 1, 2011

Because of some situation , I had to save users password in session state for short period of time .it unsafe holding some important data in session state?

View 5 Replies

New-Cache Parameters For AppFabric Cache When Storing.NET Session State

Jul 28, 2010

What are the "optimal" parameters for creating an AppFabric cache when you will be storing session state in the cache? MSDN Cache-Related Commands

Powershell command line:

New-Cache [-CacheName] <String> [-Eviction <String>] [-Expirable <String>] [-Force [<SwitchParameter>]] [-NotificationsEnabled <String>] [-Secondaries <Int32>] [-TimeToLive <Int64>]

[code]...

Since I don't want my sessions to be removed unless the session has been abandoned either via code or Session Timeout...For eviction, I would think "None" and for expireable, I would think False.I have tested and calling Session.Abandon does remove the object from the cache. I have also tested to see if by extending my session, the session object in cache is also extended. This does seem to work the "correct" way.

View 1 Replies

State Management :: Session Time Out On IIS?

Jan 11, 2011

I have developed application in ASP.NET and placed on UAT server (windows XP IIS) where it worked fine but since I moved on production server (windows 2003 + IIS) after sometime its keep on expiring the session.

Please suggest urgently if possible how i can make it not to expire session at all.

below is my web.config

[Code]....

View 8 Replies

State Management :: Get Session Age/start Time?

Apr 15, 2010

I want to be able to detect from C# code how long ago a user logged into the site. I need to take a particular action if it is their first time logging in. IsNewSession does not work, unfortunately.

View 2 Replies

State Management :: Button Already Session Time Out

Dec 7, 2010

I set session timeout is 30 at my webconfig. But when i upload a file and click submit button already session timeout. I uploaded 1kb file. I can submit 1 time.

View 11 Replies

State Management :: Give Time To Session?

Mar 5, 2010

In VB.NET how we can assign time value to session variable?

View 4 Replies

State Management :: Get Session Elapsed Time

Mar 29, 2010

How can I getting Session Elapsed Time?

View 5 Replies

State Management :: Session Time Out Earlyer With In 5 Min?

Aug 19, 2010

In my live site session time out with in 5 min only.how can i get the default i.e 20 min time . below webconfig file give below

<?xml version="1.0"?>
<!--
&nbsp;&nbsp;&nbsp; Note: As an alternative to hand editing this file you can use the

[code]...

View 7 Replies

State Management :: Increase The Session Time?

Oct 10, 2010

how do i increase the session time ?

View 4 Replies

State Management :: Check Session Every Time?

Jan 30, 2011

how to check session every time.

View 6 Replies

State Management :: How To Get Total Time Of Users' Session

Apr 1, 2011

I totally have no idea on how to do this. How can I get the time everytime the user use my system. We are using AD account here so we don't have login and log out. All I want is as long as the user browse to my system whether he is working or it or not become away or any, I will record its time and save it in my database then accumulate all the time he spent in my system for admin reporting.

View 5 Replies

State Management :: Session Time Out Exception Logged ?

May 10, 2010

I am working on a asp.net 3.5 app. In the Global.asax in the Application_Error method, I am logging everthing to ddatabase (log4Net).


I have a session limit of 20 minutes. What happens when the user hits that limit and then clicks on the Submit Button of the app. ?Will that generate any exception? and will that exception be logged into my database as I am logging all exceptions in my Application_Error method.

View 3 Replies

Session State Must Get Destroyed Each Time Building Project In Web Applications?

Mar 27, 2010

is session state must get destroyed each time we are building our project in web applications? this is really annoying because i have to re-log and get to the page i'm currently working on each time i need to build my project...

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved