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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Why not to use Session variables in DNNWhy not to use Session variables in DNN
Previous
 
Next
New Post
1/6/2009 7:39 AM
 

Hi All,

I have one simple question, why we cannot (not recommended by DNN) use Session variables in DNN?

I am stuck up in persisting the data between the pages.

One way I have seen is UserInfo class which is good example but its added as a property in PortalModuleBase. And we have decided not to touch DNN's core library.

Is there any good way to send the data between the pages and change it when user changes it.

e.g.

If I have a page called Employee List and there I have a gridview with employee listing as 1st column with HyperLink. When user clicks on that page it will go to Employee Details page and then on ward it will also move to some other pages like Employee Address Details, Employee Family Details etc. Now, when I traverse from these pages I should have EmployeeId, EmployeeName etc. available on that pages modules. How can I acheive this?

Thanks & Regards,

Deepak Khopade

 
New Post
1/6/2009 8:36 AM
 

I use session variables in several of my custom modules, must of missed the (not recommended by DNN)) somewhere along the line, and I use it exactly as you described above.

 
New Post
1/6/2009 8:51 AM
 

There isn't a DNN specific reason to avoid Session variables, DNN is just relaying the industry mantra of 'Session variables are bad'.  There are a lot of good reasons NOT to use Session variables, and you should avoid their use as much as possible. Not to say they are not useful in certain circumstances.  If you want to use Session variables, go ahead, just be aware of the Pros and Cons of doing so...

http://www.4guysfromrolla.com/webtech/092098-2.shtml#postadlink

 

 
New Post
1/6/2009 8:56 AM
 

If you pass a query parameter (like Employee ID) you also have the benfit of having a direct URL to the specific page.  For example, you can book mark the employee details page set to a specific employee, rather than always having to start at the employee list.  With session variables, this isn't always the case.


Eric Shafer
Houston Web Designer
Click and Create

281-206-2631
 
New Post
1/6/2009 10:15 AM
 

Hi All,

Thanks for your replies.

Thanks Steve, thet 4Guys link is very usefull.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Why not to use Session variables in DNNWhy not to use Session variables in DNN


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