Professional Web Applications Themes

Access to Session Object Property - ASP.NET Security

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...

  1. #1

    Default Access to Session Object Property

    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
    Dorsa Guest

  2. #2

    Default Re: Access to Session Object Property

    Well, you could store an object using:

    System.Web.SessionState.HttpSessionState.Add(strin g 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> wrote in message
    news:232605da.0312170847.4a4ea0f1posting.google.c om...
    > 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

    Chris Jackson Guest

Similar Threads

  1. DataGrid - Error #1009: Cannot access a property ormethod of a null object reference.
    By misery_101 in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: April 4th, 11:44 PM
  2. Replies: 0
    Last Post: November 13th, 11:04 AM
  3. Http Request and Session Object Access
    By Pradeep_ch in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: May 5th, 01:33 PM
  4. object in session can not access
    By Lichunlin in forum ASP Components
    Replies: 0
    Last Post: July 6th, 03:00 AM
  5. Replies: 1
    Last Post: September 1st, 08:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139