how to keep selected items in temporary memory?
Question
i want tot add items from gridview temporary memory before clicking save button. Not add database. User add green right arrow. i am using Ext.NET
Add to cart (memory showing gridview) Add to cart (memory showing gridview) Add to cart (memory showing gridview)
And then save button to DB
Solution
I think this can help you use Session in MVC app, Try this in global.asax:
protected void Session_Start()
{
HttpContext.Current.Session.Add("superadmin", user);
}
Then in any of your controller:
user = HttpContext.Session["superadmin"];
Answer came from here: http://forums.asp.net/t/1622898.aspx/1?MVC+amp+Session+Variables
OTHER TIPS
You can either keep the data for the reqeust in the SQL database or use some sort of private static Dictionary<Request, Cart>
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow