Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem with global variables
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with global variables

 Post Reply Post Reply Page  <1234>
Author
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2003 at 10:25am

The session variables can't store objects or arrays though, right?

If they could I would be all set.

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2003 at 10:33am

you can store anything you want in the Session

strings, numbers, datasets, objects, dates, anything you want

Contribute to the working anarchy we fondly call the Internet
Back to Top
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2003 at 12:00pm

Thanks allot.

In that case, I think this will fix my problem.

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2003 at 1:01pm

btw, how much info are you storing in this object?

theres some really cool stuff you can do with .NET's built in security IF the data isn't that much....

i use FormsAuthentication to store Roles, Username, UserID, TimeOffset, StateTheyLiveIn and something else which i forget right now......  and its near-mindless code to use once set up :)

Contribute to the working anarchy we fondly call the Internet
Back to Top
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2003 at 1:15pm

I have 2 different class objects.

One class collects information about a hotline call. It has 16 properties. These properties are collected in pieces as the user progresses through the wizard. Some of the information cannot be obtained until the user is finished (example, call_end is the time the user completes the call).

The other other class is an Entity (essentially, a person), which has 20 properties. There can be up to 3 objects of this type per project depending on the choices that the user selects while stepping through the wizard.

The reason that I opted to go for the wizard type format was that the UI dynamically adapts depending on the options the user selects. I had previously only worked on applications of this nature  using JSP and Java. I think there is some different type of threading ability there because I don't remember any issues like this involving multiple users corrupting each other's data.

 

Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2003 at 5:40am
Have you tried the cache features of .NET? Those are really cool.
Gone..
Back to Top
The WizeGuy View Drop Down
Newbie
Newbie


Joined: 02 October 2003
Location: Sweden
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote The WizeGuy Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2003 at 2:58pm

What kind of information do you need to save?

What "properties" do You have in your "person object"?

If You only need to store information like Username and if the user is Authenticated the HttpContext.User.Identity is Enough and is global

How do You get information to Your Personobject?

If it is with a login, what type of Login do You use? FormsAuthentication?

Lots of questions back ... but if we get answers to them we have a lot easier to "solve" your problem

cya,
/PatrikB

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2003 at 4:16pm
read his last reply, he's storing a whole hell of a lot more information than just username
Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply Page  <1234>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.