What's the correct/best way to to persist data across postbacks using ViewState I have the following web control implemented in C#:

The page has 2 rollover buttons that are used to step through all the images in a image folder. The viewstate seems to be somewhat working, but when I debug the page in Visual Studio and put in a breakpoint where I read the value of ImgNum, I notice that ImgNum keeps coming back as "0". This is strange because it does seem to be saving the state of ImgNum even though debugging always shows it to be "0". Could someone please take a look at my code and show me the 'correct' way to implement ViewState

Posted On: Tuesday 1st of January 2013 10:16:20 PM Total Views:  145
View Complete with Replies