D
Davids
in my small hangman web project I have a Hangman class which has some
methods and properties (int GuessAttempts, string[] GuessedLetters etc..)
which change as the game goes on... Best of all would of course to be able
to save the whole class and then load it up again after postback. I
understand this is not possible, is that true?
In that case I will have to do something like load the class properties into
an array for example and store in the ViewState... or is there any other
more clever way? I know these are not many values to store but this is a
learning-case for me and I foresee in the future I might have much bigger
classes which I'd want to bring in "whole piece" between postbacks!
methods and properties (int GuessAttempts, string[] GuessedLetters etc..)
which change as the game goes on... Best of all would of course to be able
to save the whole class and then load it up again after postback. I
understand this is not possible, is that true?
In that case I will have to do something like load the class properties into
an array for example and store in the ViewState... or is there any other
more clever way? I know these are not many values to store but this is a
learning-case for me and I foresee in the future I might have much bigger
classes which I'd want to bring in "whole piece" between postbacks!