>>On a web form, I declare a vairable (int) in the class of the form which I intend to use at various places in the code-behind. For example, a primary key that may be used for a data action in one or more places. The variable gets populated early in the page_load event. However, each time a postback happens, the variable gets reset to zero. I can re-establish it on postback which seems redundant, or I can declare it static initially (either private or protected), and then it holds its value. Declaring it as a static is the easiest, but that doesn't seem like the right solution as I understand the definition of static.
>>
>>Am I on the right track here, or is there a better way to get the variable to persist.
>>
>>Dick Harrold
>
>viewstate
David,
Thanks, I'll give the viewstate a try.
Dick Harrold
=========================================
Dick Harrold [DickHarrold@Yahoo.com]