Problem with Session variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vini171285
    New Member
    • Apr 2008
    • 60

    Problem with Session variables

    Hi,
    In my project, i am saving all details in Session variables to retain them between pages..
    but the problem is,when i save a single value,it is stored in session variable,but suppose i try to save a name-(A B C)-then only A is stored,the values after space are not stored in session variable..
    is there any other alternative to using session??
    Thanx..
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    You should store the value of String data type like this way :
    e.g.
    Session("Name") = "A B C"

    Originally posted by Vini171285
    Hi,
    In my project, i am saving all details in Session variables to retain them between pages..
    but the problem is,when i save a single value,it is stored in session variable,but suppose i try to save a name-(A B C)-then only A is stored,the values after space are not stored in session variable..
    is there any other alternative to using session??
    Thanx..

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      There are other alternatives, but this should work. show your code for how you save the variables now.

      Jared

      Comment

      • jeffstl
        Recognized Expert Contributor
        • Feb 2008
        • 432

        #4
        Originally posted by Vini171285
        Hi,
        In my project, i am saving all details in Session variables to retain them between pages..
        but the problem is,when i save a single value,it is stored in session variable,but suppose i try to save a name-(A B C)-then only A is stored,the values after space are not stored in session variable..
        is there any other alternative to using session??
        Thanx..
        Is that because you are not using Server.URLEncod e(MyVar) when sending it from a query string maybe?

        If you don't encode a string with spaces before putting it in a querystring it will lose anything after the first space.

        Comment

        Working...