I
IPGrunt
As far as I know I do, there's a submit button (with no codeback code)
that is clicked to cause a postback. If the page lives in the
browser, why would the form data be cleared when the back button is
clicked ? (after the submit button is clicked)
In my initial post to you, I thought you had not submitted the page. I
wanted to be sure that you understood the process.
By the way, why is there no code behind the submit button?
So, here we have two cases:
If the page, form and controls are set to use viewstate, then after
postback, those values will persist.
If the page is not submitted, ie, no postback, there's not gonna be any
viewstate created.
These are the two states to consider BEFORE the back button gets
clicked.
You can test, to see which state you're in--use the debugger to examine
viewstate. There are other techniques...this is a digression, but I
read a nice article recently that described how viewstate is encoded. I
can't recall the URL now, but if you search I'll bet you find it. This
way you could even write some of those values out to screen or a file
to convince yourself they are there.
If you have viewstate, then when you go back, and return, I wonder if
your controls are being reinitialized. This is what Juan was referring
to.
Again, use the debugger and write some test code.
-- ipgrunt