Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Losing custom session value after member loginLosing custom session value after member login
Previous
 
Next
New Post
5/20/2013 7:17 AM
 
All,

I have a custom module that sets some values in session but I'm losing them after members log in.

What can I do to retain the values before and after the member logs in?

Thanks,
Mark
 
New Post
5/20/2013 12:40 PM
 
Mark,

propably the session restarts after the login (I don't have any prove for that, and not enough time to try it, so this is my shot in the dark).

What about using cookies instead of sessin variables?

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
5/20/2013 2:00 PM
 

I am using the session in my cart alot before login or after login in the custom module can you share the code what you are doing may be there will be some logical error and can you please inform me how you are accessing your session ? 


 

Best Regards 
Best visualization
http://www.bestvisualization.com 

 
New Post
5/20/2013 6:58 PM
 
Sorry, I just got more details. It's when registering a new user, not login.

For example, user shops, adds items to their basket and then registers. It's during the registration process that the session drops.

Here's the code that create a new datatable, adds the row/columns and saves it to session:

Code:

//create an empty DataTable and Add some columns to it
Basket_DataTable = new DataTable();
Basket_DataTable.Columns.Add("ProductID");
Basket_DataTable.Columns.Add("ProductName");
Basket_DataTable.Columns.Add("CatalogNumber");
Basket_DataTable.Columns.Add("Quantity");
Basket_DataTable.Columns.Add("PackageSize");
Basket_DataTable.Columns.Add("Price");
Basket_DataTable.Columns.Add("Total");
Basket_DataTable.Columns.Add("PackageSizeID");

// Now throw the new datatable in the session.
Session["Basket"] = Basket_DataTable;


Thanks,
Mark
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Losing custom session value after member loginLosing custom session value after member login


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out