Problem with Viewstate.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotpranay
    New Member
    • Apr 2007
    • 9

    #1

    Problem with Viewstate.

    Hi,

    I am developing a web appl where in i have to maintain the value of a variable between multiple postbacks.

    Please tell me how can i maintain this value in viewstate... The main point is that i would be that in each postback i want to update the value of this variable in viewstate.

    Thnx in advance...
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    I would put the value of your variable into a hidden form field on the page and enable the view state on the hidden form field. Either that, or I would use cookies or a session variable. If it's something that only pertains to this page though, I would most likely use the hidden form field route.

    Comment

    • malav123
      New Member
      • Feb 2008
      • 217

      #3
      Hi,
      Yes sure you can use Viewstate variables to update on your multiple postbacks where is the problem with that ? otherwise you can use Session variables if you want to use the value of that variable in to multiple forms....
      i think this will help u....

      Comment

      • dotpranay
        New Member
        • Apr 2007
        • 9

        #4
        Thnx guys for the responce... I dis it using session vars this time.

        But i am facing prob while the secong partial postback.. nyways i hav used sesion vars later. Initially i wanted to use only viewstate considering the stability of it....

        Comment

        Working...