Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to store Array List in Session ???

How to store Array List in Session ???

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdata-structureshelp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imshally81
    wrote on last edited by
    #1

    Hi all, how to store Array list in session... when mode of session is StateServer. I try this but it gives following error. "Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'" Note : I m using asp.net with vb.net Any idea Thanks, Sajjad

    P 1 Reply Last reply
    0
    • I imshally81

      Hi all, how to store Array list in session... when mode of session is StateServer. I try this but it gives following error. "Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'" Note : I m using asp.net with vb.net Any idea Thanks, Sajjad

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      What are you storing in the arraylist? If they are objects, then all the objects must be marked as serializable.

      I P 2 Replies Last reply
      0
      • P Paddy Boyd

        What are you storing in the arraylist? If they are objects, then all the objects must be marked as serializable.

        I Offline
        I Offline
        imshally81
        wrote on last edited by
        #3

        thanx for reply, i am storing a object of Textbox and Label... which are generates dynamically.... Thanx once again :)

        1 Reply Last reply
        0
        • P Paddy Boyd

          What are you storing in the arraylist? If they are objects, then all the objects must be marked as serializable.

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Unfortunately, the textbox is not serializable. If you just need the text, then i would suggest just saving the text string in the arraylist, otherwise, you might want to have a look at this. (Considerably more complex).

          I 1 Reply Last reply
          0
          • P Paddy Boyd

            Unfortunately, the textbox is not serializable. If you just need the text, then i would suggest just saving the text string in the arraylist, otherwise, you might want to have a look at this. (Considerably more complex).

            I Offline
            I Offline
            imshally81
            wrote on last edited by
            #5

            its tooo complex :~ man... any easy solution............ thanx once again :) Sajjad

            D 1 Reply Last reply
            0
            • I imshally81

              its tooo complex :~ man... any easy solution............ thanx once again :) Sajjad

              D Offline
              D Offline
              Daniel Santillanes
              wrote on last edited by
              #6

              May be you can simply store the two strings separated with a "pipe" character (|) and when you retrieve the arraylist, you can split it and you have the text once again. But this can be resource consuming since I suppose you want to have the textbox and label back, and this would mean creating new textbox and label objects. daniero

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups