Saving label values

Last post 01-06-2009 2:53 PM by rami_nassar. 4 replies.

Sort Posts:

  • Saving label values

    01-06-2009, 2:05 PM
    • Member
      3 point Member
    • Vinnyvagus
    • Member since 01-06-2009, 4:36 PM
    • Posts 9

    Hi there.

    Just wondering how I can save the values of various labels on a page so they stay there until next changed by the user.  I have created a few drop down lists and then a button which when clicked shows the selections in the label.  If though i browse away from the page and back again the labels are all blank again.  So how can i keep the labels values until the user changes them once again?

     many thanks

    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world"
  • Re: Saving label values

    01-06-2009, 2:14 PM
    Answer
    • All-Star
      86,764 point All-Star
    • ecbruck
    • Member since 12-30-2005, 7:39 PM
    • Des Moines, IA
    • Posts 9,209
    • Moderator
      TrustedFriends-MVPs

    Store your Label values within the Session object or within a Cookie.

    Thanks, Ed

    Microsoft MVP - ASP/ASP.NET

  • Re: Saving label values

    01-06-2009, 2:16 PM
    Answer
    • All-Star
      25,236 point All-Star
    • budugu
    • Member since 01-12-2006, 7:15 PM
    • North Carolina
    • Posts 3,768

    How about using "Sessions state"?

    Vijay Kodali || My Blog


    "Don't be afraid to be wrong; otherwise you'll never be right."
  • Re: Saving label values

    01-06-2009, 2:51 PM
    • Member
      3 point Member
    • Vinnyvagus
    • Member since 01-06-2009, 4:36 PM
    • Posts 9

    Budugu i have read that link and was very helpful.  Many Thanks

    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world"
  • Re: Saving label values

    01-06-2009, 2:53 PM
    • Contributor
      3,472 point Contributor
    • rami_nassar
    • Member since 10-07-2008, 3:01 AM
    • U.A.E.
    • Posts 788

    enable view state to true and use it

    http://www.asp.net/learn/videos/video-11.aspx

    Regards...
    Nassar, Rami (MCP, MCTS)
    My Blog || E-Mail

    Don't forget to click "Mark as Answer" on the post that helped you.

    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
Page 1 of 1 (5 items)