Hi Chcuk,
Yes, that's correct. ViewState stores Objects which enables you to store any type of object in it (as long as it can be serialized). When you store it, you know you store, say, a string. So the underlying object is really a string, but exposed as an object (as ViewState only understands objects). In order to get it back as the type you're expecting, you need to cast it.
Hope this helps,
Imar
|