Re: Access to Session Object Property

From: Chris Jackson (chrisjATmvpsDOTorgNOSPAM)
Date: 12/17/03


Date: Wed, 17 Dec 2003 13:45:54 -0500

Well, you could store an object using:

System.Web.SessionState.HttpSessionState.Add(string name, object value);

However, if the only thing this object does is hold a boolean value, it
would be more efficient to store it using a value type, rather than wrapped
in a reference type encapsulating a value type.

-- 
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
-- 
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
-- 
"Dorsa" <dorsa_kh@yahoo.com> wrote in message
news:232605da.0312170847.4a4ea0f1@posting.google.com...
> Hi, I am new to ASP.net and VB.net.  I need to store a
> class(SecurityClass) with a property ( LoggedIn as Boolean) in the
> Session Object (Called SecurityObj) or ( As a session Object?) (Any
> difference?)
> I need to have access to the LoggedIn Property in the SecurityObj
> which is in the session object.
> I need to check if it's True or False.
> Could you please give me solution?
> Thanks
> Dorsa


Relevant Pages

  • Re: How to work with multiple response sets in Access
    ... simple checkboxes. ... but it gets simpler if I have only one survey ... and a table to store each answer to each question for each survey ... store the values in a Boolean field in the answers table, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Crash saving boolean value to RS (Row cannot be located...)
    ... Brendan Reynolds ... > Close RecordSet ... > The issue I'm dealing with is that I was attempting to store the Gender ... >> What if you give the Boolean field a default value. ...
    (microsoft.public.data.ado)
  • Re: How to change the value of Boolean variable?
    ... store a Bit value to determine if Bold is set. ... Then evaluate that value to set the bold of your command buttons. ... >> variable to a differnt type - in your case string to boolean. ... >>> dim MyVar as Boolean ...
    (microsoft.public.vb.general.discussion)
  • Re: Can a boolean ever be set to null?
    ... of bits to store, ... boolean actually takes more bits to store than a Byte, ... but I suspect that all the boolean fields in a table may ... Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.modulesdaovba)
  • Re: $| (undocumented) magic?
    ... > otherwise store 0 in it". ... implemented to return 1 in order to behave like a boolean ... This would be an advantage when comparing to boolean ... If you're comparing their boolean states (whether they are both ...
    (comp.lang.perl.misc)